Jfrog内部版本保留使用人工云随机删除内部版本(而不是删除最旧的内部版本)

时间:2019-06-17 23:19:16

标签: jenkins-pipeline artifactory

我没有进行任何代码更改-看来这才刚刚开始发生

我在我的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 /”下随机选择了一个工件,而不是最旧的工件。

0 个答案:

没有答案