CD part XX: Create continuous Delivery Pipeline

  • 24/03/2017
  • 4 minuten leestijd

CD part XX: Create continuous Delivery Pipeline

This blog puts all the pieces together and create a continuous delivery pipeline

create continuous delivery pipeline

pre-condition we have 5 jobs to create our pipeline:

  1. continuous delivery job
  2. sonar
  3. deployment
  4. smoketest
  5. suitetest

all jobs

1. Install Parameterized Trigger plugin a

  1. click in the menu on Manage Jenkins
  2. click on Manage Plugins
  3. select the Available tab
  4. search for Parameterized Trigger plugin

![parameterized trigger plugin](https://drive.google.com/uc? id=0B8J22dDh67I9YW5kUER0UWRuMXM)

  1. select the plugin and click on the Install without restart button
  2. jenkins navigates to the Installing plugins/upgrades page, were we see an overview of the plugins to be installed.
  3. stop the tomcat instance and start the instance again

2. configure the 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/job/wsaccountstatus_ci/
  3. click on the Configure link
  4. check the checkbox This build is parameterized(if it is not done)
  5. add a String Parameter
    1. Name: PLGITCOMMIT
    2. Default Value: develop
    3. Description: From which branch the latest revision is used
  6. navigate to Branches to build
  7. and set the value to ${PLGITCOMMIT}

parameterized branches to build

2.2 setting up the downstream project

  1. navigate tot the Post-build Actions section of the job
  2. add post-build action by clicking on Add post-build action
  3. select Trigger parameterized build on other projects
    1. Projects to build: wsaccountstatus_sonar,
    2. Trigger when build is: Stable
    3. Add Parameters: current build parameters

3. configure the sonar job

  1. open a browser and navigate to: http://localhost:8075/jenkins/job/wsaccountstatus_sonar/
  2. click on the Configure link
  3. check the checkbox This build is parameterized(if it is not done)
  4. add a String Parameter
    1. Name: PLGITCOMMIT
    2. Default Value: develop
    3. Description: From which branch the latest revision is used
  5. navigate to Branches to build
  6. and set the value to ${PLGITCOMMIT}

parameterized branches to build

3.2 setting up the downstream project

  1. navigate tot the Post-build Actions section of the job
  2. add post-build action by clicking on Add post-build action
  3. select Trigger parameterized build on other projects
    1. Projects to build: wsaccountstatusdeployto_test,
    2. Trigger when build is: Stable
    3. Add Parameters: current build parameters

4. configure the deployment job

  1. open a browser and navigate to: http://localhost:8075/jenkins/job/wsaccountstatusdeployto_test/
  2. click on the Configure link
  3. check the checkbox This build is parameterized(if it is not done)
  4. add a String Parameter
    1. Name: PLGITCOMMIT
    2. Default Value: develop
    3. Description: From which branch the latest revision is used
  5. navigate to Branches to build
  6. and set the value to ${PLGITCOMMIT}

parameterized branches to build

4.2 setting up the downstream project

  1. navigate tot the Post-build Actions section of the job
  2. add post-build action by clicking on Add post-build action
  3. select Trigger parameterized build on other projects
    1. Projects to build: wsaccountstatus_smoketest,
    2. Trigger when build is: Stable
    3. Add Parameters: current build parameters

5. configure the smoketest job

  1. open a browser and navigate to: http://localhost:8075/jenkins/job/wsaccountstatus_smoketest/
  2. click on the Configure link
  3. check the checkbox This build is parameterized(if it is not done)
  4. add a String Parameter
    1. Name: PLGITCOMMIT
    2. Default Value: develop
    3. Description: From which branch the latest revision is used
  5. navigate to Branches to build
  6. and set the value to ${PLGITCOMMIT}

parameterized branches to build

5.2 setting up the downstream project

  1. navigate tot the Post-build Actions section of the job
  2. add post-build action by clicking on Add post-build action
  3. select Trigger parameterized build on other projects
    1. Projects to build: wsaccountstatus_suitetest,
    2. Trigger when build is: Stable
    3. Add Parameters: current build parameters
  4. also add Predefined parameters
    1. SUITETORUN=FitNesse.SuiteAcceptanceTests.SuiteSlimTests

6. Install Build Pipeline plugin a

  1. click in the menu on Manage Jenkins
  2. click on Manage Plugins
  3. select the Available tab
  4. search for Build Pipeline plugin build pipeline 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

6.1 create view

  1. click on the add new View
  2. add pipeline view, to click on the + button add pipeline view button
    1. Name overviewtab: wsaccountstatuscdpipeline
    2. select the Build Pipeline View radiobutton
  3. name: wsaccountstatuscdpipeline
  4. Description: Continuous Delivery Pipeline for Webservice Account Status
  5. Build Pipeline View Title: Continuous Delivery Pipeline for Webservice Account Status
  6. Select Initital Job: wsaccountstatus_ci

continuous delivery pipeline view

  1. click on the re-run button to start the pipeline

continuous delivery pipeline view rerunned