我使用 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_NAME,我在快照存储库中尝试提交作业的名称和工件的名称作为BUILD_NUMBER,我使用像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'."
} ]
}
你知道如何成功运行它吗?或者一些标志来获取有关此错误的更多信息?