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.
- relates to
-
JENKINS-47756 GitHub plugin triggers builds when changes pushed to global pipeline
-
- Resolved
-
[JENKINS-35026] Pipeline script from SCM triggers builds on sub pipeline change
Description |
Original:
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. |
New:
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. |
Description |
Original:
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. |
New:
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. |
Description |
Original:
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. |
New:
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. |
Description |
Original:
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. |
New:
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. |
Description |
Original:
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. |
New:
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. |
Attachment | New: jenkns-plugins.txt [ 32780 ] |
Component/s | New: git-plugin [ 15543 ] |
Also tried with "poll: false"
... but without any success.
Anyone ever encountered this issue ?