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

GitHub plugin triggers builds when changes pushed to global pipeline

    Details

    • Similar Issues:

      Description

      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.

        Attachments

          Issue Links

            Activity

            Hide
            lanwen 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.

            Show
            lanwen 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.
            Hide
            externl 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.

            Show
            externl 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.
            Hide
            lanwen 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

            Show
            lanwen 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
            Hide
            externl 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?

            Show
            externl 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?
            Hide
            externl 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?

            Show
            externl 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?
            Hide
            externl Joe George added a comment -

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

            Show
            externl Joe George added a comment - These are very similar. One is a globally included library and the other is a locally included librar.
            Hide
            externl 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.

            Show
            externl 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.
            Hide
            jeraldsm 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.

            Show
            jeraldsm 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.
            Hide
            externl Joe George added a comment -

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

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

            This is working as designed.

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

              People

              • Assignee:
                lanwen Kirill Merkushev
                Reporter:
                externl Joe George
              • Votes:
                2 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: