Implementing a Deployment Pipeline with Jenkins
Deployment Pipeline
Here we will build a very basic deployment pipeline using the Jenkins Continuous Integration Server and the Build Pipeline Jenkins plugin.
This basic pipeline will consist of a number of jobs:
- Build the artifact
- Acceptance testing
- Deploy to Staging
- Deploy to live
Some of the gates between jobs will be automatically triggered and some will be done manually using the Build Pipeline View. Please note the purpose of this post is to illustrate the process of creating a pipeline, the details of building artifacts, performing acceptance testing, automated deployment, etc will be saved for future posts.
Prerequisites
- Install Jenkins
- Install the Build Pipeline plugin http://updates.jenkins-ci.org/download/plugins/build-pipeline-plugin/
- Intall the Groovy pluginhttp://updates.jenkins-ci.org/download/plugins/groovy/
- Install the parameterized Trigger plugin https://wiki.jenkins-ci.org/display/JENKINS/Parameterized+Trigger+Plugin
Build Job
The first job in your pipeline is usually responsible for setting the version number, building the artifact and deploying the artifact to an artifact repo. The build task may also include running unit tests, reporting code coverage and code analytics.
The first task is to create a new job as below: