Unfortunately I am not versed enough in programming to add this functionality...
I think that the workaround will add lots of "red rows" in the job view, because it first has to checkout the repo, check the messages and then abort... On Thursday, March 23, 2017 at 3:59:07 PM UTC+2, Mark Waite wrote: > > The git plugin as used in pipeline doesn't support ignoring commits from > certain users, or ignoring commits with certain messages. Until it does, > you will probably need to "short circuit" and exit from the pipeline after > using git commands to extract the latest commit message from the > repository. It's not a pretty solution, but it can work now. > > Another alternative is to fork the git plugin and add the "ignore commits > from specific user" support to the pipeline. > > Mark Waite > > On Thu, Mar 23, 2017 at 7:43 AM Idan Adar <id...@adar.me <javascript:>> > wrote: > >> I should add that the job is of multibranch type. >> >> >> On Thursday, March 23, 2017 at 3:10:51 PM UTC+2, Idan Adar wrote: >>> >>> Hi all, >>> >>> In a declarative pipeline (a Jenkinsfile in the repo), how can I stop a >>> job from getting re/triggered due to a push event in GitHub? >>> For example: >>> >>> stage ("Publish to npm") { >>> steps { >>> sh ''' >>> npm publish >>> npm --no-git-tag-version version minor >>> ''' >>> >>> sh ''' >>> git commit -am 'Bumped version number' >>> git push >>> ''' >>> } >>> } >>> >>> The "git push" will trigger the push webhook in GitHub that makes a call >>> to Jenkins, which will in turn start the same Jenkinsfile and again bump >>> the version, commit, push and again... a loop. >>> How can we not-trigger the job in this scenario? >>> >>> >>> -- >> You received this message because you are subscribed to the Google Groups >> "Jenkins Users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to jenkinsci-use...@googlegroups.com <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/jenkinsci-users/af0d3836-ae98-4e09-93bf-9dfa4d65b39f%40googlegroups.com >> >> <https://groups.google.com/d/msgid/jenkinsci-users/af0d3836-ae98-4e09-93bf-9dfa4d65b39f%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/a8f94adf-357e-412e-8665-16c5663a1c05%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.