Lar*_*Cai 3 git gerrit jenkins gerrit-trigger jenkins-pipeline
我们在Jenkins中使用gerrit-trigger,当推送新的变更集进行审核时会触发构建.
现在我们要介绍管道并使用解决方案在scm中定义管道
因此,我们期望在构建被触发时,管道插件下方可以检查此refspec
但是${GERRIT_REFSPEC}这里没有效果,它仍然可以检查主人
> git rev-parse refs/remotes/origin/master^{commit} # timeout=10
> git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision adf5d360582b1b24f088cfa8ac0f0ebf64a57692 (refs/remotes/origin/master)
Commit message: "DO:CI End of summer"
> git config core.sparsecheckout # timeout=10
> git checkout -f adf5d360582b1b24f088cfa8ac0f0ebf64a57692
有什么建议它是如何工作的?
我想你需要设置:
Repositories > Refspec = $GERRIT_REFSPEC:$GERRIT_REFSPEC
Branches to build > Branch Specifier = $GERRIT_REFSPEC
Run Code Online (Sandbox Code Playgroud)
重要提示:不要忘记取消选中" 轻量级结帐 "选项.
| 归档时间: |
|
| 查看次数: |
4887 次 |
| 最近记录: |