我没有进行任何代码更改-看来这才刚刚开始发生
我在我的jenkins管道中使用该插件,如下所示:
def artifactory = Artifactory.server 'me.jfrog.io'
def buildInfo = Artifactory.newBuildInfo()
def maxBuilds = 5
def uploadSpec = """{
"files": [
{
"pattern": "(*)",
"target": "dev-builds/myapp/${env.BUILD_NUMBER}/{1}"
}
]
}"""
buildInfo.name = "dev_myapp" // namespace build under "dev_<app-name>"
buildInfo.number = env.BUILD_NUMBER
buildInfo.env.capture = true
buildInfo.retention maxBuilds: maxBuilds, deleteBuildArtifacts: true, async: false
artifactory.upload spec: uploadSpec, buildInfo: buildInfo
artifactory.publishBuildInfo buildInfo
运行构建保留时,似乎只是在“ dev-builds / myapp /”下随机选择了一个工件,而不是最旧的工件。