• Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • github-plugin
    • None

      I'm using a verified merge setup where Jenkins compiles code from my staging branch and merges it into master if the build is successful. I want to update my staging branch as well, but this sends Jenkins into a loop. I'd like to be able to ignore commits from certain users (Jenkins itself) and not build pushes that only contain them.

          [JENKINS-24208] ignore users in GitHub plugin

          Jon Shier added a comment -

          I'm not sure what a good way to upvote an issue here would be but I would like this feature too. Same reason, to avoid build loops with automatic commits.

          Jon Shier added a comment - I'm not sure what a good way to upvote an issue here would be but I would like this feature too. Same reason, to avoid build loops with automatic commits.

          Christophe Lallement added a comment - - edited

          I'm exactly in the same configuration:
          Our jenkins instance hosts some jobs typed as "Continuous delivery".
          Those jobs are triggered by github with this plugin.

          So it means we compile, package execute some test and then release it automatically
          At some point, release means changing version inside the pom.xml and pushing into the remote repository in order to share the new version (snapshot) across all developers.

          ... and there we enter in a loop because after pushing, github detect a change and call back again jenkins

          So it could be nice in the admin section of the plugin (or maybe per project) to be able to enter a "blacklist/ignore) username.
          In case where this username field is set, the plugin ignore commit done by this user

          Do you think possible to do this type of enhancement ?
          Thx
          Christophe

          Christophe Lallement added a comment - - edited I'm exactly in the same configuration: Our jenkins instance hosts some jobs typed as "Continuous delivery". Those jobs are triggered by github with this plugin. So it means we compile, package execute some test and then release it automatically At some point, release means changing version inside the pom.xml and pushing into the remote repository in order to share the new version (snapshot) across all developers. ... and there we enter in a loop because after pushing, github detect a change and call back again jenkins So it could be nice in the admin section of the plugin (or maybe per project) to be able to enter a "blacklist/ignore) username. In case where this username field is set, the plugin ignore commit done by this user Do you think possible to do this type of enhancement ? Thx Christophe

          Can help gitscm setup?

          Kirill Merkushev added a comment - Can help gitscm setup?

          lanwen I gonna test it but I think It can not help because in fact there is no polling.
          Job is trigerred by github itself, git information is just used to checkout/rebase the master branch

          Christophe Lallement added a comment - lanwen I gonna test it but I think It can not help because in fact there is no polling. Job is trigerred by github itself, git information is just used to checkout/rebase the master branch

          in code it looks like this:

          boolean result = SCMTriggerItems.asSCMTriggerItem(job).poll(listener).hasChanges();
          

          so there is a polling with help of git plugin itself

          Kirill Merkushev added a comment - in code it looks like this: boolean result = SCMTriggerItems.asSCMTriggerItem(job).poll(listener).hasChanges(); so there is a polling with help of git plugin itself

          Christophe Lallement added a comment - - edited

          Hi

          Unfortunately it doesn't work.
          As mentioned into help of git plugin (see screen-shot)
          It looks like it's call only when the option "poll for changes is enabled", which is not my case.

          Can you put the priority higher please, it's really closed to a bug because it means when you enable this option for your build it assumes your job cannot do some git push otherwise you're gonna enter in a loop.

          Continuous Delivery is really a strong market trend and it could be nice to use this plugin in order to reach this goal

          I'll have a look into the jenkins plugin (but never do that before), for someone who know the API it should be easy to add just a string field close to "Build when a change is pushed to GitHub" and do not trigger this build if last push is done by this user (could be more easy at global config).

          Thx
          Christophe

          Christophe Lallement added a comment - - edited Hi Unfortunately it doesn't work. As mentioned into help of git plugin (see screen-shot) It looks like it's call only when the option "poll for changes is enabled", which is not my case. Can you put the priority higher please , it's really closed to a bug because it means when you enable this option for your build it assumes your job cannot do some git push otherwise you're gonna enter in a loop. Continuous Delivery is really a strong market trend and it could be nice to use this plugin in order to reach this goal I'll have a look into the jenkins plugin (but never do that before), for someone who know the API it should be easy to add just a string field close to "Build when a change is pushed to GitHub" and do not trigger this build if last push is done by this user (could be more easy at global config). Thx Christophe

          Hi,
          I created a PR in order to ignore a pusher:

          https://github.com/jenkinsci/github-plugin/pull/83

          Christophe Lallement added a comment - Hi, I created a PR in order to ignore a pusher: https://github.com/jenkinsci/github-plugin/pull/83

          Izek Greenfied added a comment - - edited

          What the status of this issue?

          Could you use the Run Condition Plugin to support this?

          Izek Greenfied added a comment - - edited What the status of this issue? Could you use the Run Condition Plugin to support this?

          any update on this??

          Ebrahim Moshaya added a comment - any update on this??

            integer Kanstantsin Shautsou
            chrylis Christopher Smith
            Votes:
            7 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated: