How to trigger parameterized job from Jenkins pipeline
There are certain situation where one job need to be configured as the downstream jobs of another job.
This tutorial explains the details of the configurations to trigger a parameterized job from another Jenkins pipeline.
Example pipeline snippet is given below.
stage('Trigger Depoy Job') {
steps{
build job:'deploy-app' , parameters:[
string(name: 'Name',value: 'Demo-app'),
string(name: 'Version',value:'1.0.0')
]
}
}
Here one separate stage is configured in pipeline to trigger the parameterized job. This stage requires the job name as well as the parameter details also.
Parameter specification need to be modified according to the downstream jobs.
That's all…