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 created issue -

          Just use job with trigger as parent job to start your pipeline (like a separate job which just calls child job). The way it works that GitHub trigger scans all SCMs and listens on all of them.

          Kirill Merkushev added a comment - Just use job with trigger as parent job to start your pipeline (like a separate job which just calls child job). The way it works that GitHub trigger scans all SCMs and listens on all of them.
          Kirill Merkushev made changes -
          Priority Original: Blocker [ 1 ] New: Minor [ 4 ]

          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 made changes -
          Link New: This issue relates to JENKINS-35026 [ JENKINS-35026 ]

          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.

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

              Created:
              Updated:
              Resolved: