#1541
[Jenkins] Pipeline Script – How to
Start another job :
node { stage('Run 1st job') { sh 'date' build job: 'Job1' } }
Parallel :
node { stage('Run all jobs //') { parallel ( phase1: { build job: 'Job1'}, phase2: { build job: 'Job2'}, phase3: { build job: 'Job3'} ) } }
Check job result :
node { def result stage('Check Job result') { sh 'date' result = build job: 'Job1' } if(result.result == 'FAILURE') { echo '1. Set result to unstable' currentBuild.result = 'UNSTABLE' } else { echo '2. Set result to '+result.result.toString() currentBuild.result = result.result } }
WordPress behind an nginx SSL reverse proxy | Obfuscation’s End Using Docker and Nginx to serve multiple WordPress sites
Define a complex object :
Pipeline & Maven tool
Declarative pipeline sample :
Upgrade Rancher (v1) Service
Keep maven color during pipeline :
Declare mutli upstream projects:
with multi branches:
Doc: https://www.jenkins.io/doc/book/pipeline/syntax/#triggers
Jenkins Pipeline agent label from the parameter:
Docker agent:
https://www.jenkins.io/doc/book/pipeline/docker/
https://github.com/docker-library/official-images#consistency