我使用Jenkins Artifactory插件进行升级。我尝试创建单独的工作来提升工件。这里是推广阶段
stage('promote artifact') {
steps {
script {
String buildName = "${BUILD_NAME}"
String buildNumber = "${BUILD_NUMBER}"
def promotionConfig = [
//Mandatory parameters
'buildName' : buildName,
'buildNumber' : buildNumber,
'targetRepo' : "tst",
//Optional parameters
'comment' : "this is the promotion comment",
'sourceRepo' : "dev",
'status' : "Released",
'includeDependencies': true,
'failFast' : true,
'copy' : true
]
// Promote build
server.promote promotionConfig
}
}
}
作为BUILD\u NAME,我在快照存储库中尝试提交作业的名称和工件的名称
作为BUILD\u编号,我使用类似于1的内部版本号,而不使用类似于1.0.0的版本号。
但毕竟我
Performing dry run promotion (no changes are made during dry run) ...
ERROR: Promotion failed during dry run (no change in Artifactory was done): HTTP/1.1 404 Not Found
{
"errors" : [ {
"status" : 404,
"message" : "Cannot find builds by the name 'artifact-name' and the number '1'."
} ]
}
你知道如何成功运行它吗?或某个标志以获取有关此错误的更多信息?