Example Code for my article about Jenkins Pipeline in the German Java Magazin
-
Setup local WildFly
-
Unzip WildFly
-
Run WildFly with
bin/standalone.sh -Djboss.socket.binding.port-offset=200
-
Add a management user using
bin/add-user.sh
-
Setup Jenkins
-
Run Jenkins with
java -jar jenkins.war --httpPort=8180
-
Unlock jenkins using the password provided on the shell when starting jenkins
-
Install the following additional plugins (Manage Jenkins -> Manage Plugins -> Tab Available):
Pipeline Utility Steps -
Restart Jenkins
- Configure Tools (Manage Jenkins -> Global Tool Confiugration)
- Add JDK
Name: JDK_1.8
Install automatically: yes
Select newest JDK 1.8 version - Add Maven
Name: maven_3.3.3
Install automatically: yes
Select version: 3.3.3 - Configure mail (Manage Jenkins -> Configure System -> E-mail Notification)
- 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 a new pipeline Job and use the
Jenkinsfile
provided in this repo - Select 'New item'
- Enter job name and select pipeline project
- 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