使用rest api / api / build / promote错误无法找到构建工件的工件

时间:2015-09-30 04:45:55

标签: api rest build artifactory

我的有效载荷是:

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个版本可以在神器中看到你能帮我解决这个问题。

1 个答案:

答案 0 :(得分:0)

我有类似的问题,问题不在于促销,而在于发布。您必须确保将以下属性添加到工件中,因为Artifactory链接构建和工件的方式如下:

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

Artifactory是一个很棒的产品,但文档缺乏很多细节。