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'。 –