[英]JFrog Artifactory artifacts uploaded via jenkins dont show up in builds
I use Jenkins to build my project, once that is done I upload the directory with all artifact files or just a single file to JFrog.我使用 Jenkins 来构建我的项目,完成后我将包含所有工件文件的目录或仅一个文件上传到 JFrog。 Pipeline-code example:
管道代码示例:
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
When the file is uploaded it has the build.name and build.number property.上传文件时,它具有 build.name 和 build.number 属性。
But my issue is it will not show up under Artifactory -> Builds.但我的问题是它不会出现在 Artifactory -> Builds 下。
This is an issue since I want to have the option to download the latest file from this build using:这是一个问题,因为我希望可以选择使用以下命令从此版本下载最新文件:
"files": [
{
"pattern": "test-generic-local/uploadconfig*",
"target": "./",
"build" : "nameOfMyJenkinsJob/LATEST"
}
]
When I try to run it now without the artifacts being listed under Build I get the following error message:当我现在尝试运行它而不在构建下列出工件时,我收到以下错误消息:
The build name nameOfMyJenkinsJob could not be found.找不到构建名称nameOfMyJenkinsJob 。
I see that you are not publishing the build to Artifactory.我看到您没有将构建发布到 Artifactory。 Kindly refer to this JFrog wiki on how to publish the build info.
请参阅此 JFrog wiki ,了解如何发布构建信息。 Also, I would recommend you referring this Github Jenkins file where in the build publish stage is where the build is pushed.
此外,我建议您参考此Github Jenkins 文件,其中构建发布阶段是推送构建的位置。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.