Reputation: 4667
We have an SCM-controlled project that polls a repo every several minutes. Overall the workflow is great but occasionally I need to push the new changes to the server's repository without triggering a build in Jenkins (for various reasons: long builds, minor changes, concurrent commits etc).
I have already set up a quiet period, and sometimes I just start and stop the build (which is awkward), so the Jenkins pulls the changes and does not trigger the build later.
So, is there a plugin of any sort that allows either:
Upvotes: 4
Views: 6552
Reputation: 16605
Another idea (not necessarily a better one, but it may better suit your tastes): use Run Condition Plugin. Make the rest of your build conditional on a parameter (let's name it DO_BUILD). Set that parameter to TRUE by default. If you need to commit something without triggering the build set DO_BUILD default to FALSE.
A variation on the same idea: you do your polling in one job (Trigger) that calls your main job via Parameterized Trigger Plugin in a build step. That build step is then can be conditioned upon a parameter. Note that in this case you will either have to use the same custom workspace for both builds, or do a manual check out (say, in a shell build step) in the main job.
Upvotes: 1
Reputation: 80761
You have many solutions to do this :
Upvotes: 7
Reputation: 4340
Take a look at that: https://wiki.jenkins-ci.org/display/JENKINS/PollSCM+Plugin
you should configure the build trigger as "Build periodically" (without "Pool SCM" trigger) only and i think that might do the job
Upvotes: 2