-
Story
-
Resolution: Duplicate
-
Minor
-
Windows, Jenkins 2.50
At least as of a few updates ago (I swear this used to work) I've noticed all the Pipeline projects I've set up only trigger once, and then I have to go in and set the build triggers again because all the triggers have become unset.
This of course makes the pipeline projects I've set up fairly unhelpful, since this thus requires manual intervention for every single run.
I've narrowed this down to parameters. If I have a "Pipeline script" or specify a Jenkinsfile with "Pipeline script from SCM", any build (whether triggered by one of the Build Triggers or manually) results in the Build Triggers becoming unset.
Specifically, the following settings, if set before the build is run, become uncheckmarked:
- Build after other projects are built
- Build periodically
- GitHub hook trigger for GITScm polling
- Poll SCM
Interestingly, although they are also under the Build Triggers heading, "Quiet period" and "Trigger builds remotely (e.g., from scripts)" remain set.
Here is an example Pipeline script that reproduces this problem for me:
pipeline { agent any parameters { string(name: 'requested', defaultValue: 'all', description: 'Which stages should be run?') } stages { stage('stage1') { steps { echo 'Running stage 1' } } } }
Conversely, the following doesn't lose the scheduling settings:
pipeline { agent any stages { stage('stage1') { steps { echo 'Running stage 1' } } } }
- duplicates
-
JENKINS-44621 Declarative is over-eager in deleting job properties not defined in the Jenkinsfile
- Closed