CD part XII: Setup the Jenkins Server

  • 27/01/2017
  • 2 minuten leestijd

CD part XII: Setup the Jenkins Server

this blog is used to setup our jenkins server on which we create our jobs to run our FitNesse tests

jenkins installation

  1. we need to download jenkins
  2. go to: https://jenkins.io/
  3. click on the download button and select the LTS version
  4. a war file is downloaded
  5. copy this war file to the folder: C:\tools\tomcat_jenkins\webapps
  6. start the tomcat instance

install git plugin in jenkins

  1. click in the menu on Manage Jenkins
  2. click on Manage Plugins
  3. select the Available tab
  4. search for Git plugin
  5. select the plugin and click on the Install without restart button
  6. jenkins navigates to the Installing plugins/upgrades page, were we see an overview of the plugins to be installed.
  7. stop the tomcat instance and start the instance again
  8. click in the menu on Manage Jenkins
  9. click on the Configure link
  10. we need to configure the jdk and maven installation
  11. jdk label: j.d.k 1.8
  12. jdk JAVAHOME: C:\tools\Java\jdk1.8.077
  13. maven label: apache-maven-3.3.9
  14. maven MAVEN_HOME: C:\tools\apache-maven-3.3.9
  15. restart jenkins

setup credentials in jenkins

  1. we start the tomcat instance for jenkins by executing the tomcat jenkins - start.cmd script
  2. open a browser and navigate to: http://localhost:8075/jenkins/
  3. select in the left menu Credentials
  4. click in Global Credentials
  5. click on Add Credentials
  6. add the credentials of your bitbucket account

jenkins_bitbucket_credentials

create continuous integration job

  1. we start the tomcat instance for jenkins by executing the tomcat jenkins - start.cmd script
  2. open a browser and navigate to: http://localhost:8075/jenkins/
  3. click in the sidemenu on New Job
  4. for this exercise, we are using the account status webservice
  5. call this item: wsaccountstatus_ci
  6. select the first radiobutton create a freestyle project
  7. in the Source Code Management section select the Git radiobutton
  8. enter the url: https://bitbucket.org/johantuitel/easywebservices.git
  9. select the credentials you have made for your bitbucket account
  10. in my case it was j.tuitel@developers.nl/*(bitbucket account)
  11. after that we need to set the correct branch in the field Branches to build
  12. enter: develop
  13. add a build step and select Invoke Top-level Maven
  14. target: clean install
  15. POM: AccountStatusWebservice\pom.xml
  16. click on Save and we are done

test continuous integration job

  1. select the job and click on build
  2. yeah it works