Jenkins JobDSL multibranchPipelineJob change script path

后端 未结 4 1076
天涯浪人
天涯浪人 2021-02-18 13:04

I am trying to create a multibranchPipelineJob in jobDSL, however the Jenkinsfile is at an alternative location to the default. I have looked through the docs https://jenkinsci

4条回答
  •  -上瘾入骨i
    2021-02-18 13:54

    The setting is a bit hidden, but the Automatically Generated DSL supports setting the script path for a multibranch job:

    multibranchPipelineJob('example') {
      factory {
        workflowMultiBranchProjectFactory {
          scriptPath('my-location/Jenkinsfile')
        }
      }
    } 
    

提交回复
热议问题