[英]How to download one specific gerrit change set in jenkins git plugin?
Normally we use gerrit trigger plugin in jenkins to download the gerrit changeset. 通常,我们在jenkins中使用gerrit触发器插件来下载gerrit变更集。
But in some case, we want to download the specific changesets directly. 但是在某些情况下,我们想直接下载特定的变更集。
For example openstack Change #503032 例如openstack Change#503032
git pull git://git.openstack.org/openstack/tripleo-quickstart-extras refs/changes/32/503032/2
And set the Refspec
to refs/changes/32/503032/2
in git repo like 并将
Refspec
设置为git repo中的refs/changes/32/503032/2
And enable the Honor refspec on initial clone
in Additional behaviours like 并在其他行为中启用
Honor refspec on initial clone
的Honor refspec on initial clone
例如
But I got error in console log 但是我在控制台日志中出现错误
Fetching upstream changes from git://git.openstack.org/openstack/tripleo-quickstart-extras > git fetch --tags --progress git://git.openstack.org/openstack/tripleo-quickstart-extras refs/changes/32/503032/2 --depth=1 > git rev-parse refs/remotes/origin/master^{commit} # timeout=10 > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10 > git rev-parse origin/master^{commit} # timeout=10 ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
Any suggestion, we don't want to use the extra command in shell build step. 任何建议,我们都不想在shell构建步骤中使用额外的命令。
Set "Branch" to FETCH_HEAD
and the specified refspec will be checked out. 将“分支”设置为
FETCH_HEAD
,将检出指定的FETCH_HEAD
。
FETCH_HEAD
is a temporary ref pointing to the latest fetched refspec, eg. FETCH_HEAD
是指向最新获取的FETCH_HEAD
的临时ref,例如。 branch, commit. 分支,提交。 See this question for more information: What does FETCH_HEAD in Git mean?
有关更多信息,请参见此问题: Git中的FETCH_HEAD是什么意思? .
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.