Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-33532

Changes on Github Feature Branches Trigger Jobs tracking Master Branch Changes

    Details

    • Similar Issues:

      Description

      I've setup all our Jenkins jobs to only build when there pushes to the master branch. However, any new branches or changes on branches other than master trigger the jobs. Any ideas?

      Polling log as follows:

      Started on Mar 14, 2016 2:11:30 PM
      Using strategy: Default
      [poll] Last Built Revision: Revision 2d14482153fd0d704c0a6d7339130e482b8f7ac7 (refs/remotes/origin/master)
      using .gitcredentials to set credentials
      > git --version # timeout=10
      > git init /tmp/hudson589221852595043374tmp # timeout=10
      > git config --local credential.username jenkins-cognito # timeout=10
      > git config --local credential.helper store --file=/tmp/git81826252988248937.credentials # timeout=10
      > git -c core.askpass=true ls-remote -h https://github.com/CognitoIQ/api-gateway.git # timeout=10
      > git config --local --remove-section credential # timeout=10
      Found 9 remote heads on https://github.com/CognitoIQ/api-gateway.git
      Ignoring refs/heads/HNS-509 as it doesn't match any of the configured refspecs
      Ignoring refs/heads/HNS-132 as it doesn't match any of the configured refspecs
      Ignoring refs/heads/HNS-487 as it doesn't match any of the configured refspecs
      Ignoring refs/heads/HNS-487-2 as it doesn't match any of the configured refspecs
      Ignoring refs/heads/feature/swagger-docs as it doesn't match any of the configured refspecs
      Ignoring refs/heads/HEAD as it doesn't match any of the configured refspecs
      Ignoring refs/heads/HNS-62 as it doesn't match any of the configured refspecs
      Ignoring refs/heads/REL-BRANCH-api-gateway-0.1 as it doesn't match any of the configured refspecs
      [poll] Latest remote head revision on refs/heads/master is: 714510ffd4e649c221fb18a17402f0634e86b57f
      Done. Took 1.2 sec
      Changes found

        Attachments

          Activity

          Hide
          lanwen Kirill Merkushev added a comment -

          This says that your master was changed. Isn't it?

          [poll] Last Built Revision: Revision 2d14482153fd0d704c0a6d7339130e482b8f7ac7 (refs/remotes/origin/master)
          [poll] Latest remote head revision on refs/heads/master is: 714510ffd4e649c221fb18a17402f0634e86b57f
          
          Show
          lanwen Kirill Merkushev added a comment - This says that your master was changed. Isn't it? [poll] Last Built Revision: Revision 2d14482153fd0d704c0a6d7339130e482b8f7ac7 (refs/remotes/origin/master) [poll] Latest remote head revision on refs/heads/master is: 714510ffd4e649c221fb18a17402f0634e86b57f
          Hide
          ebrahim_moshaya Ebrahim Moshaya added a comment -

          I've got polling ignoring changes from our jenkins-ci commits. However, when there's been a push on a feature branch, it triggers the build. The revision will be different as the last commit to master was a maven release and update to poms only by jenkinsci user.

          Show
          ebrahim_moshaya Ebrahim Moshaya added a comment - I've got polling ignoring changes from our jenkins-ci commits. However, when there's been a push on a feature branch, it triggers the build. The revision will be different as the last commit to master was a maven release and update to poms only by jenkinsci user.
          Hide
          lanwen Kirill Merkushev added a comment -

          The logic of github-plugin is very simple - if sha is changed (as in your case) - it will trigger the build.

          Show
          lanwen Kirill Merkushev added a comment - The logic of github-plugin is very simple - if sha is changed (as in your case) - it will trigger the build.
          Hide
          integer Kanstantsin Shautsou added a comment -

          Not exactly, it calls only gitscm poll, that has custom crazy logic. https://issues.jenkins-ci.org/browse/JENKINS-30475

          Show
          integer Kanstantsin Shautsou added a comment - Not exactly, it calls only gitscm poll, that has custom crazy logic. https://issues.jenkins-ci.org/browse/JENKINS-30475

            People

            • Assignee:
              lanwen Kirill Merkushev
              Reporter:
              ebrahim_moshaya Ebrahim Moshaya
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: