Reputation: 353
I would like to implement the following in a job : When we click on the "Build" button of a parametrized build, the user will get a prompt/popup asking if they would like to perform the build or not. If, The answer (yes/no) then the build runs - otherwise not.
Are there any pointers to relevant documentation on how to do this ? Any plugins doing anything similar I am already using the Parameterized build, I want this when we click on the Build button not prior to that, as we have a Choice parameter in the build, and I need the user always select the correct choice from the drop down. Please help, I did not get anything related to this till now. The other options are to use a Boolean parameters / choice for yes / no, I was thinking more along the lines of a popup or confirmation like before erasing a job , there is an "are you sure" prompt. Any idea how to implement that kind of confirmation message ?
Upvotes: 22
Views: 21012
Reputation: 3055
Jenkins has a conditional-buildstep plug-in designed for this. It probably has a few other dependencies, but it seems the plug-in manager automatically handles this detail.
Once installed :
• Add a select parameter to your build
• Add a condition to cancel your build or put your conditions on the specific steps you want to enable conditionnally
• profit.
Step 1 :
Step 2 :
°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
Here's the official page :
Upvotes: 3
Reputation: 201
Add a parameter to the build. You could just name the parameter "Are you Sure?".
Upvotes: 17