【发布时间】:2020-03-15 17:06:13
【问题描述】:
我正在尝试将快照 jar 升级为发布。我需要使用 maven 分类器名称来区分升级的 jar。有没有办法在推广 jfog Artifactory 的构建时更改版本或设置分类器?
def promotionConfig = [
// Mandatory parameters
'targetRepo' : 'libs-prod-ready-local',
// Optional parameters
// The build name and build number to promote. If not specified, the Jenkins job's build name and build number are used
'buildName' : buildInfo.name,
'buildNumber' : buildInfo.number,
// Comment and Status to be displayed in the Build History tab in Artifactory
'comment' : 'this is the promotion comment',
'status' : 'Released',
// Specifies the source repository for build artifacts.
'sourceRepo' : 'libs-staging-local',
// Indicates whether to promote the build dependencies, in addition to the artifacts. False by default
'includeDependencies': true,
// Indicates whether to copy the files. Move is the default
'copy' : true,
// Indicates whether to fail the promotion process in case of failing to move or copy one of the files. False by default.
'failFast' : true
]
// Promote build
server.promote promotionConfig
【问题讨论】:
标签: jenkins-pipeline artifactory