Pipeline #1
stage("build") {
echo "in build"
}
stage("deploy to prod") {
input message: "Deploy to prod?"
milestone(ordinal: 20, label: "prod")
echo "deploying to prod"
}
Pipeline #2
stage("build") {
echo "in build"
}
stage("deploy to test") {
milestone(ordinal: 10, label: "test")
echo "deploying to test"
}
stage("deploy to prod") {
input message: "Deploy to prod?"
milestone(ordinal: 20, label: "prod")
echo "deploying to prod"
}
After creating a pipeline job with Pipeline #1 and starting 3 invocations Jenkins looks like this:
Next, abort build #2 and then Jenkins looks like this:
This all looks correct. Next I proceed build #3 and then Jenkins looks like this:
This also seems correct. Build #1 looks like it's still running, but as soon as the input releases control it will either terminate with an exception (the user hit "Abort") or terminate because it's been superseded by #3 which has hit the milestone. Everything operating as expected here.