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
You can execute a Groovy script as a pre build step. I have done this a couple of times at my company. You have to install the Groovy plugin. Then you can add a pre build step "Execute system groovy script" and there you can execute something like that:
Jenkins.instance.getItem("jobname").disable()
For enabling of jobs after the build add a post build step and execute
Jenkins.instance.getItem("jobname").enable()
If you want a job, that only enables or disables other build jobs, then you don't choose pre or post build steps, but a normal build step with a system Groovy script.
You can do many more thinks with Groovy scripts. It is worth to read more about it.