I have an upstream and downstream job, that downstream job refers to a Jenkinsfile stored in Github. I assume the values are not being passed on to the Jenkinsfile.
This is what I have:
- The upstream job has choice parameters
parameters {
choice(
name: 'WHICH_ACTION',
choices: ["Stop", "Deploy"],
description: 'Choose whether to stop or deploy services'
)
}
which are being passed on to downstream job
build job: 'payment/payment-provider-api', propagate: false
parameters: [
string(name: "WHICH_ACTION", value: params.ACTION),
]
- The Jenkinsfile should take the values from the Upstream job
stages {
stage('Stop') {
when {
expression { ACTION == 'Stop' }
}
I use parameterised build plugin.
I get an error. Is it because my syntax is incorrect or because the values are not passing? Any advice appreciated