Gitlab webhook does not trigger a build on jenkins

前端 未结 4 1425
野的像风
野的像风 2021-02-07 07:39

I\'ve a group of multibranch pipeline jobs generated with the following piece groovy script:

[
      \'repo1\',
      \'repo2\',
].each { service ->

  multib         


        
4条回答
  •  忘了有多久
    2021-02-07 08:10

    I believe you need to use includes() to specify pattern(s) identifying which branches will be included:

    branchSources {
      git {
        remote("git@gitlab.com:whatever/${service}.git")
        credentialsId('gitlab-ssh-key')
        includes('ci')
      }
    }
    

    You can specify a number of patterns, which can include wildcards. For example:

    includes("master release/* feature/* bugfix/*")
    

    There is also a corresponding excludes() for even finer-grained control.

提交回复
热议问题