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

Pipeline script from SCM triggers builds on sub pipeline change

    Details

    • Similar Issues:

      Description

      We are using "pipeline script from SCM" feature in all our services, and they load themselves a generic pipeline located in another Git repo, using following syntax :

      
      // This pipeline is in all our services
      node {
          // Some treatment ...
      
          // Load the generic pipeline
          git 'http://our-git-url/git/jenkins-pipelines.git'
          load 'generic-pipeline.groovy'
      }()
      

      Now our Jenkins jobs get triggered whenever a change to our service is commited, which is what we want.
      Problem is that the same jenkins job also gets triggered whenever a change is made to the loaded pipeline "generic-pipeline.grovy", when there is supposedly no reason to trigger on such an event.

        Attachments

        1. Jenkins_Pipeline.png
          Jenkins_Pipeline.png
          6 kB
        2. jenkns-plugins.txt
          7 kB
        3. poll.txt
          4 kB

          Issue Links

            Activity

            pommedouze Olivier Revial created issue -
            pommedouze Olivier Revial made changes -
            Field Original Value New Value
            Description We are using "pipeline script from SCM" feature in all our services, and they load themselves a generic pipeline located in another Git repo, using following syntax :

            {{// This pipeline is in all our services
            node {
                // Some treatment ...

                // Load the generic pipeline
                git 'http://our-git-url/git/jenkins-pipelines.git'
                load 'generic-pipeline.groovy'
            }()}}

            Now our Jenkins jobs get triggered whenever a change to our service is commited, which is what we want.
            *Problem is that the same jenkins job also gets triggered whenever a change is made to the loaded pipeline "generic-pipeline.grovy"*, when there is supposedly no reason to trigger on such an event.
            We are using "pipeline script from SCM" feature in all our services, and they load themselves a generic pipeline located in another Git repo, using following syntax :

            {{
            // This pipeline is in all our services
            node {
                // Some treatment ...

                // Load the generic pipeline
                git 'http://our-git-url/git/jenkins-pipelines.git'
                load 'generic-pipeline.groovy'
            }()
            }}

            Now our Jenkins jobs get triggered whenever a change to our service is commited, which is what we want.
            *Problem is that the same jenkins job also gets triggered whenever a change is made to the loaded pipeline "generic-pipeline.grovy"*, when there is supposedly no reason to trigger on such an event.
            pommedouze Olivier Revial made changes -
            Description We are using "pipeline script from SCM" feature in all our services, and they load themselves a generic pipeline located in another Git repo, using following syntax :

            {{
            // This pipeline is in all our services
            node {
                // Some treatment ...

                // Load the generic pipeline
                git 'http://our-git-url/git/jenkins-pipelines.git'
                load 'generic-pipeline.groovy'
            }()
            }}

            Now our Jenkins jobs get triggered whenever a change to our service is commited, which is what we want.
            *Problem is that the same jenkins job also gets triggered whenever a change is made to the loaded pipeline "generic-pipeline.grovy"*, when there is supposedly no reason to trigger on such an event.
            We are using "pipeline script from SCM" feature in all our services, and they load themselves a generic pipeline located in another Git repo, using following syntax :

            {{
            ^// This pipeline is in all our services
            node {
                // Some treatment ...

                // Load the generic pipeline
                git 'http://our-git-url/git/jenkins-pipelines.git'
                load 'generic-pipeline.groovy'
            }()^
            }}

            Now our Jenkins jobs get triggered whenever a change to our service is commited, which is what we want.
            *Problem is that the same jenkins job also gets triggered whenever a change is made to the loaded pipeline "generic-pipeline.grovy"*, when there is supposedly no reason to trigger on such an event.
            pommedouze Olivier Revial made changes -
            Description We are using "pipeline script from SCM" feature in all our services, and they load themselves a generic pipeline located in another Git repo, using following syntax :

            {{
            ^// This pipeline is in all our services
            node {
                // Some treatment ...

                // Load the generic pipeline
                git 'http://our-git-url/git/jenkins-pipelines.git'
                load 'generic-pipeline.groovy'
            }()^
            }}

            Now our Jenkins jobs get triggered whenever a change to our service is commited, which is what we want.
            *Problem is that the same jenkins job also gets triggered whenever a change is made to the loaded pipeline "generic-pipeline.grovy"*, when there is supposedly no reason to trigger on such an event.
            We are using "pipeline script from SCM" feature in all our services, and they load themselves a generic pipeline located in another Git repo, using following syntax :

            {{
            {quote}// This pipeline is in all our services
            node {
                // Some treatment ...

                // Load the generic pipeline
                git 'http://our-git-url/git/jenkins-pipelines.git'
                load 'generic-pipeline.groovy'
            }(){quote}
            }}

            Now our Jenkins jobs get triggered whenever a change to our service is commited, which is what we want.
            *Problem is that the same jenkins job also gets triggered whenever a change is made to the loaded pipeline "generic-pipeline.grovy"*, when there is supposedly no reason to trigger on such an event.
            pommedouze Olivier Revial made changes -
            Description We are using "pipeline script from SCM" feature in all our services, and they load themselves a generic pipeline located in another Git repo, using following syntax :

            {{
            {quote}// This pipeline is in all our services
            node {
                // Some treatment ...

                // Load the generic pipeline
                git 'http://our-git-url/git/jenkins-pipelines.git'
                load 'generic-pipeline.groovy'
            }(){quote}
            }}

            Now our Jenkins jobs get triggered whenever a change to our service is commited, which is what we want.
            *Problem is that the same jenkins job also gets triggered whenever a change is made to the loaded pipeline "generic-pipeline.grovy"*, when there is supposedly no reason to trigger on such an event.
            We are using "pipeline script from SCM" feature in all our services, and they load themselves a generic pipeline located in another Git repo, using following syntax :

            // This pipeline is in all our services
            node {
                // Some treatment ...

                // Load the generic pipeline
                git 'http://our-git-url/git/jenkins-pipelines.git'
                load 'generic-pipeline.groovy'
            }()

            Now our Jenkins jobs get triggered whenever a change to our service is commited, which is what we want.
            *Problem is that the same jenkins job also gets triggered whenever a change is made to the loaded pipeline "generic-pipeline.grovy"*, when there is supposedly no reason to trigger on such an event.
            pommedouze Olivier Revial made changes -
            Description We are using "pipeline script from SCM" feature in all our services, and they load themselves a generic pipeline located in another Git repo, using following syntax :

            // This pipeline is in all our services
            node {
                // Some treatment ...

                // Load the generic pipeline
                git 'http://our-git-url/git/jenkins-pipelines.git'
                load 'generic-pipeline.groovy'
            }()

            Now our Jenkins jobs get triggered whenever a change to our service is commited, which is what we want.
            *Problem is that the same jenkins job also gets triggered whenever a change is made to the loaded pipeline "generic-pipeline.grovy"*, when there is supposedly no reason to trigger on such an event.
            We are using "pipeline script from SCM" feature in all our services, and they load themselves a generic pipeline located in another Git repo, using following syntax :

            {code:java}

            // This pipeline is in all our services
            node {
                // Some treatment ...

                // Load the generic pipeline
                git 'http://our-git-url/git/jenkins-pipelines.git'
                load 'generic-pipeline.groovy'
            }()
            {code}


            Now our Jenkins jobs get triggered whenever a change to our service is commited, which is what we want.
            *Problem is that the same jenkins job also gets triggered whenever a change is made to the loaded pipeline "generic-pipeline.grovy"*, when there is supposedly no reason to trigger on such an event.
            pommedouze Olivier Revial made changes -
            Attachment jenkns-plugins.txt [ 32780 ]
            pommedouze Olivier Revial made changes -
            Component/s git-plugin [ 15543 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 171236 ] JNJira + In-Review [ 184238 ]
            jwillemsen Johnny Willemsen made changes -
            Attachment poll.txt [ 34025 ]
            externl Joe George made changes -
            Link This issue relates to JENKINS-47756 [ JENKINS-47756 ]

              People

              • Assignee:
                Unassigned
                Reporter:
                pommedouze Olivier Revial
              • Votes:
                4 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                • Created:
                  Updated: