Pipeline > Test > Prod clearness safety

Hi

I have been using Jenkins for quite a while. Very happy with it. Super stable and does what I need in general.
Been automating builds to test for a long time using pipeline.

Now I would really like to expand this to cover production as well. So first deploy to test, run some automatic tests and maybe a week of manual tests. Finally deploy to production.

I have seen examples where production is a part of the same pipeline, so there is a question in between. Do you want to deploy to production? [Yes/No]. I do not like this since it is super simple to accidentally press Yes. If it would require me to enter a string like “YESIAMSURE” it would be better but have not found a way to do this.

Also lets say the release is tested and we find an error and then a new version is built to test. Then I have multiple pipelines waiting for me to select if I am going forward to production or not. Would be great if a new build to test would automatically say no to production environment on all earlier builds.

Does anyone have similar thoughts? Got anything similar working?

Kind regards
Jens

I thought there was a confirm too

https://support.cloudbees.com/hc/en-us/articles/230922428-Pipeline-How-to-add-an-input-step-that-continues-if-aborted-using-value

specifically disableConcurrentBuilds() will kill all runs in the same pipeline pipeline

Pipeline: Milestone Step is possibly also useful

Thanks for the reply.

Would’nt disableConcurrentBuilds prevent new build from bein executed rather than cancel the current running build?

I think there’s a parameter that changes the behavior. I’ve forgotten which is default now. I use (true) myself

@halkeye ca i really stop a running concurrent build with this command?

Read up on it a bit and from what i understand it should be used in a declqrqtive pipeline and would fully prevent concurrent builds. So it will in that case not do what i want. As i want the next build to start and cancel the build waiting for confirmation.