-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
Jenkins 2.204.1
Milestone Step Plugin 1.3.1
Input Step Plugin 2.11
I may be misunderstanding how to use the milestone, sorry in advance if I am.
I have a simple pipeline configured as follows:
node('some-node') { stage('First') { milestone 1 input(id: 'input', message: 'Deploy?') } stage('Second') { milestone 2 } }
If I have builds 1 and 2 sitting at the input step, and I "reject" build #2 so that it does not proceed any further, build #1 is still automatically aborted. This does not make sense to me, because build #2 has not reached "milestone 2". Please advise.
This Issue should better be titled: "Cancelling a build should not abort older builds in sight of the same milestone".
I'm having the same problem as the reporting user.
I have setup a build-pipeline that waits for user approvals before deploying my application to my QA, STAGING and PRODUCTION environments, respectively. The situation is this:
There are multiple builds waiting for an approval to deploy to STAGING, so all of them are currently in sight of the same previous milestone (e.g. "deployed to QA"). I abort the newest build, because it didn't pass quality requirements on QA, and should never be deployed to STAGING, but I wish for older builds at the same input-step to continue waiting for approval to deploy to STAGING. The bad build gets cancelled as expected, but the milestone plugin subsequently performs some clean-up including aborting all other builds in sight of the same milestone (namely "deployed to QA"). This is not the expected behavior, because the just cancelled build did not progress to the next milestone in order to be allowed to abort its siblings.
I believe, this behaviour is due to this: https://github.com/jenkinsci/pipeline-milestone-step-plugin/blob/ab24d126caaad2c507ec0d26b7cb87d314e1f296/src/main/java/org/jenkinsci/plugins/pipeline/milestone/MilestoneStepExecution.java#L189
Which is only ever executed from here: https://github.com/jenkinsci/pipeline-milestone-step-plugin/blob/ab24d126caaad2c507ec0d26b7cb87d314e1f296/src/main/java/org/jenkinsci/plugins/pipeline/milestone/MilestoneStepExecution.java#L330