通过Jenkins Artifactory插件使用Artifactory Promotion时,没有选项可以自动永久保留此版本。是否可以添加这样的逻辑?
我们有一个包含推广步骤的管道:
stage ('Prepare Promotion Env'){
steps{
script{
def server = Artifactory.server('artifactory')
def promotionConfig = [
// Mandatory parameters
'buildName' : env.JOB_NAME,
'buildNumber' : env.BUILD_NUMBER,
'targetRepo' : 'release_repo',
// Optional parameters
'comment' : 'this is the promotion comment',
'sourceRepo' : 'source_repo',
'status' : 'Released',
'copy' : true
]
Artifactory.addInteractivePromotion server: server, promotionConfig: promotionConfig, displayName: "Promote me please"
}
}
}