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

GitHub plugin triggers builds when changes pushed to global pipeline

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Minor Minor
    • github-plugin
    • None

      I have a global pipeline library configured for use my pipeline jobs. In a pipeline I have GitHub hook trigger for GITScm polling enabled. In the pipeline itself I use git scm to checkout a repo. 

      Push changes to either global pipeline (bad) or the project I checkout with git scm (good) trigger a new build.

      In summary: pushing changes to pipeline libs should not trigger new builds for all my jobs that use GITscm polling.

          [JENKINS-47756] GitHub plugin triggers builds when changes pushed to global pipeline

          Joe George added a comment - - edited

          I'm not sure I follow. The issue is that pushing to a git repo that is never checked out using GitScm in a pipeline and is used only as a global pipeline library should not trigger builds.

          Other jobs that are are not pipeline jobs but use git push triggers do not have this issue.

          Joe George added a comment - - edited I'm not sure I follow. The issue is that pushing to a git repo that is never checked out using GitScm in a pipeline and is used only as a global pipeline library should not trigger builds. Other jobs that are are not pipeline jobs but use git push triggers do not have this issue.

          Probably pipeline adds this type of scm like regular scm. So my suggestion is to split trigger and pipeline to different jobs

          Kirill Merkushev added a comment - Probably pipeline adds this type of scm like regular scm. So my suggestion is to split trigger and pipeline to different jobs

          Joe George added a comment -

          I see what you're saying. This still feels like a bug with the github plugin since it's the one responsible for registering GitHub hooks, no?

          Joe George added a comment - I see what you're saying. This still feels like a bug with the github plugin since it's the one responsible for registering GitHub hooks, no?

          Joe George added a comment - - edited

          This means I have to have a trigger job for every pipeline job, right? 

          Will setting poll: false remove other other git repos from being triggers as well?

          Joe George added a comment - - edited This means I have to have a trigger job for every pipeline job, right?  Will setting poll: false remove other other git repos from being triggers as well?

          Joe George added a comment -

          These are very similar. One is a globally included library and the other is a locally included librar.

          Joe George added a comment - These are very similar. One is a globally included library and the other is a locally included librar.

          Joe George added a comment -

          Even worse, builds are triggered if unbuilt changes are pushed (and a job unbuilt) and a commit on a different branch is pushed to the testing repo.

          Joe George added a comment - Even worse, builds are triggered if unbuilt changes are pushed (and a job unbuilt) and a commit on a different branch is pushed to the testing repo.

          Jerald Sabu added a comment -

          Any update on this issue ?
          I get all 7 builds triggered at the same time even when I commit a change to the pipeline script of other builds where scm polling is not even configured.

          Jerald Sabu added a comment - Any update on this issue ? I get all 7 builds triggered at the same time even when I commit a change to the pipeline script of other builds where scm polling is not even configured.

          Joe George added a comment -

          I now better understand how this all works. I'm going to close as it works as expected.

          Joe George added a comment - I now better understand how this all works. I'm going to close as it works as expected.

          Joe George added a comment -

          This is working as designed.

          Joe George added a comment - This is working as designed.

          Rich added a comment -

          externl how did you get it to work ? I am facing the same issue. Change in shared library is triggered builds.

          Rich added a comment - externl  how did you get it to work ? I am facing the same issue. Change in shared library is triggered builds.

            lanwen Kirill Merkushev
            externl Joe George
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: