I setup a Pipeline job using a Pipeline script written in the job (not in SCM) and enabled SCM polling as a Build Trigger.
The polling mechanism works and triggers a build after detecting changes, however whenever it polls there is a high chance that the config.xml will be modified, removing the SCM Trigger entirely.
I used the Job Configuration History plugin and it shows the changes happening from SYSTEM user.
Looking through jenkins.log doesn't provide much information either, as this is the only entry around the same time as the SYSTEM user updates the config.xml
Jan 17, 2017 2:17:24 PM hudson.triggers.SCMTrigger$Runner run
INFO: SCM changes detected in unified-trunk. Triggering #84
- is related to
-
JENKINS-41074 UX Issue with Polling in Multibranch Pipeline
-
- Open
-
-
JENKINS-41072 Poll the GitHub Events API as an alternative to webhook
-
- Open
-
-
JENKINS-41073 MultiBranch projects should veto SCM Polling
-
- Open
-
-
JENKINS-45053 EnvInject Properties are lost when 'properties' is used in a pipeline step
-
- Resolved
-
- links to
[JENKINS-41146] SCM Trigger configuration being overwritten by SYSTEM user in Pipeline
Description |
Original:
I setup a Pipeline job using a Pipeline script written in the job (not in SCM) and enabled SCM polling as a Build Trigger. The polling mechanism works and triggers a build after detecting changes, however whenever it polls there is a high chance that the config.xml will be modified, removing the SCM Trigger entirely. !image-2017-01-17-14-43-37-557.png|thumbnail! I used the Job Configuration History plugin and it shows the changes happening from SYSTEM user. !image-2017-01-17-14-41-29-596.png|thumbnail! |
New:
I setup a Pipeline job using a Pipeline script written in the job (not in SCM) and enabled SCM polling as a Build Trigger. The polling mechanism works and triggers a build after detecting changes, however whenever it polls there is a high chance that the config.xml will be modified, removing the SCM Trigger entirely. !image-2017-01-17-14-43-37-557.png|thumbnail! I used the Job Configuration History plugin and it shows the changes happening from SYSTEM user. !image-2017-01-17-14-41-29-596.png|thumbnail! Looking through jenkins.log doesn't provide much information either, as this is the only entry around the same time as the SYSTEM user updates the config.xml {quote} Jan 17, 2017 2:17:24 PM hudson.triggers.SCMTrigger$Runner run INFO: SCM changes detected in unified-trunk. Triggering #84 {quote} |
Component/s | Original: blueocean-plugin [ 21481 ] |
Link | New: This issue is related to JENKINS-41072 [ JENKINS-41072 ] |
Link | New: This issue is related to JENKINS-41073 [ JENKINS-41073 ] |
Link | New: This issue is related to JENKINS-41074 [ JENKINS-41074 ] |
I've discovered the issue, in my pipeline script I was defining job properties and it had an empty pipelineTriggers section.
It wasn't clear to me that this script would actually modify the config.xml on the master, and that not using a build trigger initially in the snippet generator it would default to being empty thus removing any build triggers within the config.xml.