簡體   English   中英

使用rest api / api / build / promote錯誤來提升工件,無法找到構建工件

[英]promote artifacts using rest api /api/build/promote error unable to find artifacts of build

我的有效載荷是:

payload = json.dumps({ "status": "staged", "comment": "testing.", "ciUser": "builder", "dryRun": "false", "targetRepo": "ext-release-local", "copy": "true", "artifacts": "true", "dependencies": "false", "scopes": [ "compile", "runtime" ], "properties": { "components": [ "c1", "c3", "c14" ], "release-name": [ "fb3-ga" ] }, "failFast": "true" })
headers = {'content-type': 'application/json'}

我在嘗試

response = requests.post(self.url+'/api/build/promote'+buildURL+'/2', payload, headers=headers, auth=('', ''))

出現錯誤:

{"errors": [{"status": 400, "message": "Unable to find artifacts of build 'IT-GIS-ATS :: pmstack2 :: pm1-pm1' #2: aborting promotion."}]}

我在這個位置確實有4-5個版本,可以在人工制品中看到。請您對此提供幫助。

我有一個類似的問題,問題不是升級,而是發布。 您必須確保將以下屬性添加到工件,因為這是Artifactory鏈接構建和工件的方式:

build.name
build.job
build.number
build.timestamp # Not sure if this one is needed

Artifactory是一個很棒的產品,但是文檔缺少很多細節。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

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