Basically the pipeline script is code and as long the code is not executed it does nothing. If you decide to adjust job configuration via script like "poll scm", "interval", enable/disable concurrent build and how many history entries to keep then it will affect next build only.
You have following options ... a) Pipeline job: you specify all fix parameters and then load the Jenkinsfile from your repository. The process is coded the parameters are manual. b) Multibranch pipeline job: you don't have any parameters and each remote branch can build in parallel. The pipeline code need to decide when to do what ... (example: you could eval the git branch and decided by where to deploy or where to deploy anyway). So basicall all is coded. If you have same job running in multiple Jenkins instances (like cloud: AWS regions) then you might wanna also investigate into Job DSL which is an extension the whole process. It allows to write a seed job that could run on each of your Jenkins instances creating the required Jenkins jobs for you automatically. A final word of warning related coded parameters ... The pipeline DSL is - unfortunately - not designed to implement a behavior for such job parameters which reflect the often seen Language feature "+=" (append) which means when you change one option only all other parameters you might have set manually in the job configuration are overwritten. As an example ... if you do following ... look at the pipeline syntax for the properties and adjust those two entries same way and then you see which options are additional changed ... properties([ // Max # of builds to keep: 10 buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '10')), // Do not allow concurrent builds disableConcurrentBuilds() ]) Kind Regards, Thomas On Monday, April 17, 2017 at 6:55:24 PM UTC+2, Pavel Strashkin wrote: > > Hi there, > > I wonder if anyone has details about how/when jenkins refreshes job > configuration from pipeline script (Jenkinsfile)? Is it when build is > triggered or some background job? What if I just want to adjust > configuration (add optional params) w/o running stages, how would I achieve > so? > > Thanks! > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/02fe71cc-f70d-46bc-b582-d052a0f77e76%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.