【问题标题】:Jenkins Artifactory Plugin does not publish artifacts using GradleJenkins Artifactory Plugin 不使用 Gradle 发布工件
【发布时间】:2016-09-23 06:57:40
【问题描述】:

我有一个非常基本的 Gradle 构建文件:

plugins {
    id "base"
    id "com.jfrog.artifactory" version "4.3.0"
}
configurations {
    batchConfig
}
artifacts{
    file("dist").eachFile{ zipFile ->
        batchConfig zipFile
    }
}

println "BatchConfig Artifacts: " + configurations.batchConfig.allArtifacts

这是通过 Jenkins 执行的,似乎工作正常:

存档工件:[DefaultPublishArtifact_Decorated module-0.0.post0.dev6+n4c62094-py2.7:egg:egg:null]

[buildinfo] 属性文件位于 '/tmp/buildInfo65481565498521.properties'

:artifactoryPublish

将构建描述符部署到: https://ourArtifactoryServer/artifactory/api/build

构建成功部署。

在 Artifactory 下浏览它 https://ourArtifactoryServer/artifactory/webapp/builds/testGradleBuild/34

构建成功

然而,工件实际上并没有上传到 Artifactory。

SSL 证书配置似乎工作正常,因为我必须先解决这个问题。关于我在这里缺少什么的任何建议?

【问题讨论】:

  • 请注意,当我按照@MrsTang 's answer 使用通用插件时,相关工件已发布,但我想利用完整的 Gradle 插件:/

标签: jenkins gradle artifactory


【解决方案1】:

看起来您仍然需要使用Gradle Artifactory Plugin 中概述的人工闭包。切换回使用“存档”而不是自定义配置,然后将其添加到我的构建中对其进行排序:

artifactory {
    publish {
        defaults {
            publishConfigs('archives')
        }
    }
}

【讨论】:

    猜你喜欢
    • 2013-02-13
    • 2020-03-28
    • 2014-03-04
    • 1970-01-01
    • 1970-01-01
    • 2022-12-10
    • 2016-06-21
    • 2018-10-29
    • 1970-01-01
    相关资源
    最近更新 更多