Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-54996

Immediate setup of SCM polling when using CpsScmFlowDefinition

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.

            Unassigned Unassigned
            imod Dominik Bartholdi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: