December 2017
Beginner to intermediate
362 pages
8h 35m
English
A Jenkins Multibranch CD Pipeline utilizes a Jenkinsfile. In this section, we will update our existing Jenkinsfile. Follow the given steps:
node('docker') {
stage('Poll') {
checkout scm
}
stage('Build & Unit test'){
sh 'mvn clean verify -DskipITs=true';
junit '**/target/surefire-reports/TEST-*.xml'
archive 'target/*.jar'
}
stage('Static Code Analysis'){
sh 'mvn clean verify sonar:sonar -Dsonar.projectName=example-project -Dsonar.projectKey=example-project -Dsonar.projectVersion=$BUILD_NUMBER'; ...Read now
Unlock full access