0
继我的标题。詹金斯工作DSL:我想获得提交或标记分支
我使用groovy来做到这一点。
但它不起作用。谁可以问我怎么做?
下面是我的源:
job("AAA") {
parameters {
stringParam('branch_name', 'master', 'input branch name')
stringParam('commit_id', '123456', 'input commit id')
}
gitSCM {
userRemoteConfigs {
userRemoteConfig {
url("ssh://[email protected]/abc.git")
name("${branch_name}")
}
}
branches {
branchSpec {
name("${commit_id}")
}
}}
感谢。
To MaTePe。非常感谢。是的,我没有为变量设置值。我希望它可以通过手动设置。我认为'GERRIT_REFSPEC'是'branch_name','GERRIT_PATCHSET_REVISION'是'commit_id'。 –