0

I have a GitHub repo where Jenkins service is configured to trigger a Jenkins job for every commit. However, as a part of our build pipeline we also do a mvn release - which is in turn creating a new commit that triggers a new jenkins build, and so on.

I've already looked at - Stop mvn release triggering repeat Jenkins builds

I've already tried polling ignores commits from certain users, as well as, polling ignores commits with certain messages. Neither of them seems to be working. Is there anything else that I can try from jenkins or github side, other than creating an additional job - with a script to check for the commits myself?

Thanks in advance!

sj_24
  • 41
  • 2
  • 8

1 Answers1

0

enter image description hereyou can ignore commits from specific users or specific messages.

PLS post your github config , and I will try to help.

check this configuration , it's under Additional Behaviours of git.

Mor Lajb
  • 2,546
  • 1
  • 15
  • 28
  • On GitHub Repo I have, Settings -> Hooks & Services -> Services -> Jenkins (GitHub plugin) -> and jenkins hook url -> jenkins.myserver.com/github-webhook On Jenkins I have Git selected as SCM with additional behavior for polling ignores certain commit messages and users. – sj_24 Aug 17 '17 at 17:54
  • Hi there, I have already tried the same thing, as well as polling ignores certain users, however jenkins seem to be ignoring both of these. It is still kicking off full builds for me. Is this working for you? – sj_24 Aug 17 '17 at 19:15
  • yep it works !! , are you running a freestyle job , or multibranch pipeline? – Mor Lajb Aug 17 '17 at 19:17
  • freestyle project running on open blue ocean. – sj_24 Aug 17 '17 at 19:24
  • so it should work , and it trigger with a webhook , or it poll the repository ? – Mor Lajb Aug 17 '17 at 19:25
  • It should, but it doesnt. I tried once more just now, with your regex - still not working, a full build is being triggered. I am using jenkins service plugin /webhook on github and "GitHub hook trigger for GITScm polling" as trigger in jenkins – sj_24 Aug 17 '17 at 19:46
  • Jenkins start because of the webhook trigger , you should update the trigger to ignore those messages. anothe option is to poll from this repo and disable the webhook – Mor Lajb Aug 17 '17 at 20:06
  • My last idea is to parse git last commit message , and if a release message just skip the build flow stop the build – Mor Lajb Aug 18 '17 at 06:59