pipeline {
agent none
//other stages
stage("Stage ok") {
agent any
when {
expression {
return !params.PULL_REQUEST
}
steps {
//this stage is being skipped without problems
}
}
stage("go to production") {
when {
beforeAgent true
expression {
return !params.PULL_REQUEST
}
}
input {
message "Deploy to production?" //this is being evaluated before when expression
ok "Yes"
}
agent any
steps {
//step commands
Last active
November 12, 2018 18:13
-
-
Save rmpestano/11ebfa553bdfb89fa3c91515cc7aaae2 to your computer and use it in GitHub Desktop.
input+when condition in a declarative pipeline
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is related to JENKINS-50880