Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins plugin to disable a build step manually

Tags:

jenkins

Is there a way to enable/disable build steps of a build job in Jenkins. A method like a check box to enable/disable the build steps, so we can temporarily skip some steps which should not run. (This is helpful for testing a build job)

I would like to know whether there is a plugin to do this?

like image 338
LeoN Avatar asked Nov 10 '14 05:11

LeoN


People also ask

How do you force stop a build in Jenkins?

Pipeline jobs can be stopped by sending an HTTP POST request to URL endpoints of a build. BUILD ID URL/stop - aborts a Pipeline. BUILD ID URL/term - forcibly terminates a build (should only be used if stop does not work). BUILD ID URL/kill - hard kill a pipeline.

How do I restrict Jenkins jobs to execute on a specific machine?

Set the "Restrict where this job can be run" check box in your job configuration and specify the name of your slave. If you add more slaves later, you can set labels for each slave and specify those in your job configs. See this reference documentation: https://wiki.jenkins-ci.org/display/JENKINS/Distributed+builds.


1 Answers

You can use the Conditional Build Step Plugin to do this. Surround the build step you want to toggle in a conditional step (single) and set it to run 'Never'. This will skip the build step until you want to enable it again.

If you want it to be a dynamic option you can script the plugin to enable or disable the build step depending on whether particular conditions are met, eg: A parameter has a particular value, a file exists, etc.

like image 66
IanAWP Avatar answered Sep 17 '22 12:09

IanAWP