I have an input stage in my pipeline I would like to have run only if a certain condition is met.
stage ('input stage') {
agent none
when {
expression {
condition1 == "YES"
}
}
input {
message 'Proceed with this step?'
submitter "${approvers}"
}
steps {
echo "Proceeding with step..."
}
}
However the input stage appears to wait for the submitter approval even if the condition is not met.
I'm assuming this would be possible for stages with inputs. Is there an issue with the above code block?
Thanks in advance.