Immediate setup of SCM polling when using CpsScmFlowDefinition

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      currently webhooks (e.g. github or bitbucket) are only active after the first run of the pipeline. e.g. the following pipeline will not be triggered by a bitbucket commit hook until the build was kicked of manually at least once:

      pipelineJob("install") {
        triggers {
          bitbucketPush()
        }
        definition {
          cpsScm { 
            scm { 
              git { 
                remote {
                  url('https://bitbucket.org/myorg/myrepo')
                  credentials('BITBUCKET_CRED')
                } 
                branches('develop') 
                scriptPath(’install.groovy') 
                lightweight(true)
                extensions { 
                  localBranch()
                  cleanCheckout()
                }  
              } 
            } 
          }       
        }
      }
      

      This issue requests to automatically setup triggers for the main repo at job creation/ modification. This would ease the setup of such jobs with the job-dsl plugin a lot. No further manual triggering would be required.

            Assignee:
            Unassigned
            Reporter:
            Dominik Bartholdi
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: