简体   繁体   English

通过 jenkins 上传的 JFrog Artifactory 工件不会出现在构建中

[英]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.

相关问题 如何为上传到 Jfrog Artifactory 的每个工件触发 Jenkins 管道构建 - How to trigger a Jenkins pipeline build for every artifact uploaded to Jfrog Artifactory Jfrog神器与jenkins集成 - Jfrog artifactory intigration with jenkins JFrog Artifactory 通过 Jenkins 上传 tar 失败,出现 404 - JFrog Artifactory upload tar via Jenkins failes with 404 当零工件上传到工件时,Jenkins失败 - Fail Jenkins build when zero artifacts uploaded into artifactory 在jenkins管道中将通用工件上传到JFrog Artifactory时,如何重命名现有文件夹 - How to rename existing folder while uploading generic artifacts to JFrog Artifactory in jenkins pipeline 如何使用jenkins发布构建动作将工件从工件组部署到jfrog工件 - How to deploy an artifact from group of artifacts to jfrog artifactory using jenkins post build action 如何通过Jenkins Build Offline将工件部署到Maven存储库(JFrog工件)? - How to deploy artifacts to Maven Repository (JFrog artifactory) through Jenkins Build Offline? 如何使用Jenkins中的URL触发器插件返回添加到Jfrog工件中的新工件的确切名称 - How to return the exact names of the new artifacts added to Jfrog artifactory using URL Trigger plugin in Jenkins 如何在Jenkins中使用filespec动态创建文件夹并在Jfrog人工制品中上传人工制品? - How to create folders dynamically and upload artifacts in Jfrog artifactory using filespecs in Jenkins? Jenkins 和 JFrog Artifactory - 如何设置应存储多少最后构建? - Jenkins and JFrog Artifactory - how to set how many last builds should be stored?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM