Creating a Jenkins Continuous Deployment pipeline
In the following section, we will extend our Continuous Delivery pipeline to perform deployment.
A revisit to the pipeline code for CD
The following is the complete combined code that was part of the CD:
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'; } stage ('Integration Test'){ sh 'mvn clean verify -Dsurefire.skip=true'; junit '**/target/failsafe-reports/TEST-*.xml' archive 'target/*.jar' } stage ('Publish'){ def server = Artifactory.server 'Default Artifactory Server' def uploadSpec = """{ "files": [ { "pattern": "target/hello-0.0.1.war",...