我使用 Jenkins 构建我的项目,完成后我将包含所有工件文件的目录或仅一个文件上传到 JFrog。管道代码示例:
def server = Artifactory.server "jfrog1"
sh "touch uploadconfig.json"
writeFile(file: "uploadconfig.json", text: "{ \"files\": [ { \"pattern\": \"./uploadconfig.json\", \"target\": \"test-generic-local/uploadconfig1.json\", \"flat\" : \"true\" }]}")
uploadSpec = readFile 'uploadconfig.json'
uploadInfo = server.upload spec: uploadSpec
上传文件时,它具有 build.name 和 build.number 属性。
但我的问题是它不会出现在 Artifactory -> Builds 下。
这是一个问题,因为我希望可以选择使用以下方法从该版本下载最新文件:
"files": [
{
"pattern": "test-generic-local/uploadconfig*",
"target": "./",
"build" : "nameOfMyJenkinsJob/LATEST"
}
]
当我现在尝试运行它而不在 Build 下列出工件时,我收到以下错误消息:
找不到构建名称nameOfMyJenkinsJob。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句