Jenkins Artifactory 插件不使用 Gradle 发布工件
Jenkins Artifactory Plugin does not publish artifacts using Gradle
我有一个非常基础的 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 执行的并且看起来工作正常:
Archives Artifacts: [DefaultPublishArtifact_Decorated
module-0.0.post0.dev6+n4c62094-py2.7:egg:egg:null]
[buildinfo] Properties file found at
'/tmp/buildInfo65481565498521.properties'
:artifactoryPublish
Deploying build descriptor to:
https://ourArtifactoryServer/artifactory/api/build
Build successfully deployed.
Browse it in Artifactory under
https://ourArtifactoryServer/artifactory/webapp/builds/testGradleBuild/34
BUILD SUCCESSFUL
然而,工件实际上并没有上传到 Artifactory。
SSL 证书配置似乎工作正常,因为我必须先解决这个问题。关于我在这里遗漏的任何建议?
看来您仍然需要使用 Gradle Artifactory Plugin 中概述的人工闭包。切换回使用 "archives" 而不是自定义配置,然后将其添加到我的构建中对其进行排序:
artifactory {
publish {
defaults {
publishConfigs('archives')
}
}
}
我有一个非常基础的 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 执行的并且看起来工作正常:
Archives Artifacts: [DefaultPublishArtifact_Decorated module-0.0.post0.dev6+n4c62094-py2.7:egg:egg:null]
[buildinfo] Properties file found at '/tmp/buildInfo65481565498521.properties'
:artifactoryPublish
Deploying build descriptor to: https://ourArtifactoryServer/artifactory/api/build
Build successfully deployed.
Browse it in Artifactory under https://ourArtifactoryServer/artifactory/webapp/builds/testGradleBuild/34
BUILD SUCCESSFUL
然而,工件实际上并没有上传到 Artifactory。
SSL 证书配置似乎工作正常,因为我必须先解决这个问题。关于我在这里遗漏的任何建议?
看来您仍然需要使用 Gradle Artifactory Plugin 中概述的人工闭包。切换回使用 "archives" 而不是自定义配置,然后将其添加到我的构建中对其进行排序:
artifactory {
publish {
defaults {
publishConfigs('archives')
}
}
}