如何在 Jenkins 上的 Git 中构建特定提交?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/39589595/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How do I build on specific commit in Git on Jenkins?
提问by virendrao
I am trying to build my project from a specific commit, in Jenkins.
我正在尝试从 Jenkins 中的特定提交构建我的项目。
I have specified the branch to build and it's building from the HEAD commit.
我已经指定了要构建的分支,它是从 HEAD 提交构建的。
However I want to build from any specific revision/commit.
但是我想从任何特定的修订/提交中构建。
I tried passing a GIT_COMMIT
value as a parameter but it's picking up the HEAD commit only.
我尝试将GIT_COMMIT
值作为参数传递,但它仅获取 HEAD 提交。
I also tried using svn type thing like https://svn-url@$REVISION
where REVISION is parameter passed in build.
我也尝试使用 svn 类型的东西,比如https://svn-url@$REVISION
在构建中传递参数的地方。
For git it doesn't recognize ssh://git-url@REVISION
.
对于 git,它无法识别ssh://git-url@REVISION
.