Jenkins禁用标记dsl中的每个构建
我的工作dsl如下Jenkins禁用标记dsl中的每个构建,jenkins,jenkins-pipeline,jenkins-job-dsl,Jenkins,Jenkins Pipeline,Jenkins Job Dsl,我的工作dsl如下 pipelineJob('demo/Development') { definition { cpsScm { scm { git('https://github.com/demo/demo.git','development') } scriptPath('Jenkinsfile') } } } 创建作业时,默认情况下会添加附加行为,以便为每个生成创建标记。如何在作
pipelineJob('demo/Development') {
definition {
cpsScm {
scm {
git('https://github.com/demo/demo.git','development')
}
scriptPath('Jenkinsfile')
}
}
}
创建作业时,默认情况下会添加附加行为,以便为每个生成创建标记。如何在作业dsl中禁用此功能?已设法解决此问题
git('https://github.com/demo/demo.git','development',{node -> node / 'extensions' << '' })
git('https://github.com/demo/demo.git“,”development“,{node->node/”extensions“另一个选项(如Jenkins Job DSL 1.64)是添加一个空的配置块。如果需要为scm设置其他值,这非常有用,例如:
pipelineJob('DSL_Pipeline') {
def repo = 'https://github.com/path/to/your/repo.git'
triggers {
scm('H/5 * * * *')
}
description("Pipeline for $repo")
definition {
cpsScm {
scm {
git {
remote { url(repo) }
branches('master', '**/feature*')
scriptPath('misc/Jenkinsfile.v2')
extensions { }
}
}
}
}
}
是一个有用的工具,可以破解DSL并找出什么是有效的