[英]How to download one specific gerrit change set in jenkins git plugin?
通常,我們在jenkins中使用gerrit觸發器插件來下載gerrit變更集。
但是在某些情況下,我們想直接下載特定的變更集。
git pull git://git.openstack.org/openstack/tripleo-quickstart-extras refs/changes/32/503032/2
並將Refspec
設置為git repo中的refs/changes/32/503032/2
並在其他行為中啟用Honor refspec on initial clone
的Honor refspec on initial clone
例如
但是我在控制台日志中出現錯誤
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.
任何建議,我們都不想在shell構建步驟中使用額外的命令。
將“分支”設置為FETCH_HEAD
,將檢出指定的FETCH_HEAD
。
FETCH_HEAD
是指向最新獲取的FETCH_HEAD
的臨時ref,例如。 分支,提交。 有關更多信息,請參見此問題: Git中的FETCH_HEAD是什么意思? 。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.