Is there a way in Jenkins (Hudson) to disable a job from another job?
Basically we have a build environment that does the standard building/testing. We also use the
I found one possible approach using the jenkins-cli (command-line interface). I added this build step (for me it was a Windows batch command, though I may make it a script or something more elegant):
java -jar C:\my\jenkins\path\jenkins-cli.jar -s %JENKINS_URL% disable-job "Job 1"
I haven't looked into how to get the path to Jenkins, but that should not be too hard.
Here is some information on the CLI. You can also go to http://your-jenkins:8080/cli for some of the available commands.