October 2018
Intermediate to advanced
590 pages
15h 5m
English
Jenkins Pipeline is used to streamline the build process. With various Jenkins plugins, we can define an automated continuous delivery process. Creating Jenkinsfile and committing it to the source code is the current best practice.
The following is how the Jenkinsfile looks at a high level:
pipeline { ... environment {...} stages { stage("Build package") {...} stage("Build Docker image") {...} stage("Push Docker build image") {...} stage("Deploy to staging") {...} stage("Run E2E tests") {...} } post {...}}
Let's go through each stage, one by one. The following is how the "Build package" stage looks:
stage("Build package") { steps { echo "Git commit: ${env.GIT_COMMIT}" sh "mvn clean package" }}
In this stage, we print ...
Read now
Unlock full access