Reputation: 11045
My Jenkins polls mercurial SCM for changes. Now, we have configured the build to tag, commit and push back the new changes (updated version, new tag).
This causes an infinite loop. Because of the commit and tag, Jenkins sees it as a new change and triggers a new build....
Is it possible to exclude the .hgtags file? or exclude based on the user or message?
Thx!
Upvotes: 4
Views: 1476
Reputation: 11045
Just to share my current solution.
I installed the ScriptTrigger plugin https://wiki.jenkins-ci.org/display/JENKINS/ScriptTrigger+Plugin
I wrote a script to check that the last revision was NOT created by the jenkins and triggers a new build if so.
Upvotes: 2
Reputation: 8284
Take a look at this issue. Looks like pushing only tags is not a problem as for now. But your job produces additional commit, cant figure out how to prevent Jenkins from starting a job..
Upvotes: 2
Reputation: 61
Have you looked at the Pathignore Plugin?
This plugin allows SCM-triggered jobs to ignore build requests if only certain paths have changed
Upvotes: 2