Skip to content

Latest commit

 

History

History
52 lines (48 loc) · 2.22 KB

README.md

File metadata and controls

52 lines (48 loc) · 2.22 KB

Java Magazin 09/2016: Jenkins Pipeline

Example Code for my article about Jenkins Pipeline in the German Java Magazin

Local setup (linux)

  1. Setup local WildFly

  2. Download WildFly 10

  3. Unzip WildFly

  4. Run WildFly with bin/standalone.sh -Djboss.socket.binding.port-offset=200

  5. Add a management user using bin/add-user.sh

  6. Setup Jenkins

  7. Download Jenkins 2.x war

  8. Run Jenkins with java -jar jenkins.war --httpPort=8180

  9. Unlock jenkins using the password provided on the shell when starting jenkins Inital password shown in the shell

    Configure user

  10. Install suggested plugins install suggested plugins

  11. Configure admin user configure admin user

  12. Install the following additional plugins (Manage Jenkins -> Manage Plugins -> Tab Available):
    Pipeline Utility Steps

  13. Restart Jenkins

Configure Jenkins

  1. Configure Tools (Manage Jenkins -> Global Tool Confiugration)
  2. Add JDK
    Name: JDK_1.8
    Install automatically: yes
    Select newest JDK 1.8 version
  3. Add Maven
    Name: maven_3.3.3
    Install automatically: yes
    Select version: 3.3.3
  4. Configure mail (Manage Jenkins -> Configure System -> E-mail Notification)
  5. Setup credentials for WildFly (Credentials -> Sytem -> Global credentials -> Add Credentials)
    Kind: Username with password
    Scope: Global
    Username: User name of your WildFly
    Password: Password of yout WildFly
    ID: wildFlyManagementCredentials

Create Jenkins Job

  1. Create a new pipeline Job and use the Jenkinsfile provided in this repo
  2. Select 'New item'
  3. Enter job name and select pipeline project Enter job name and select pipeline project
  4. In the pipeline section of the configuration page configure the following:
    Definition: Pipeline script from SCM
    SCM: Git
    Repositories: https://github.com/getrostt/java-magazin-jenkins-pipeline.git Configure pipeline script