簡體   English   中英

如何在jenkins git插件中下載一個特定的Gerrit更改集?

[英]How to download one specific gerrit change set in jenkins git plugin?

通常,我們在jenkins中使用gerrit觸發器插件來下載gerrit變更集。

但是在某些情況下,我們想直接下載特定的變更集。

例如openstack Change#503032

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 cloneHonor 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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM