这是我的工作 DSL,它创建 pipelinejob,其中脚本取自 scm 本身。
pipelineJob ("${jobName}_deploy") {
description("built by seed")
definition {
cpsScm {
scm {
git {
remote {
url('gitUrl')
credentials('user_creds')
}
branch('master')
}
}
scriptPath "scripts/pipeline/jenkinsfile_deploy"
}
}
}
任何帮助将不胜感激。我有很多工作,我需要打开每一个工作并单击该复选框,这很痛苦。
最佳答案
您可以使用 Configure Block添加内置 DSL 中缺少的任何选项:
pipelineJob('example') {
definition {
cpsScm {
// ...
}
}
configure {
it / definition / lightweight(true)
}
}
关于jenkins如何为pipelineJob启用轻量级结账?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43714739/