Error publishing build info using Gradle Artifactory plugin
See original GitHub issueDescribe the bug When publishing build information after publishing the artifact in our pipeline, we encountered the following error.
> Task :artifactoryPublish
> Task :extractModuleInfo
[pool-4-thread-1] Deploying artifact: https://artifactory.***.com/artifactory/libs-staging-local/ca/***/common/servicenow-infra-compcostenv-dc/1.0.0-d3caa64/servicenow-infra-compcostenv-dc-1.0.0-d3caa64.zip
[pool-4-thread-1] Deploying artifact: https://artifactory.***.com/artifactory/libs-staging-local/ca/***/common/servicenow-infra-compcostenv-dc/1.0.0-d3caa64/servicenow-infra-compcostenv-dc-1.0.0-d3caa64.pom
> Task :artifactoryDeploy
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.2.2/userguide/command_line_interface.html#sec:command_line_warnings
BUILD SUCCESSFUL in 10s
15 actionable tasks: 10 executed, 5 up-to-date
ERROR: Couldn't read generated build info at : e:\disk1\jenkins\e921a184\workspace\Web\dte-containers\build_servicenow-infra-compcostenv-dc@tmp\artifactory\generated.build.info2240171544815622294.json
build.gradle publishing content
publishing {
publications {
mavenJava(MavenPublication) {
artifact source: distApp, extension: 'zip'
version = version
}
}
}
artifactory {
contextUrl = artifactory_contexturl
publish {
repository{
repoKey = 'libs-snapshot-local'
}
defaults {
publications('mavenJava')
}
}
}
To Reproduce Declarative pipeline step executing the gradle script execution:
stage('Publish'){
steps{
rtGradleRun(
buildFile: 'build.gradle',
tasks: "immutableSnapshot artifactoryPublish",
deployerId: "GRADLE_DEPLOYER",
resolverId: "GRADLE_RESOLVER",
useWrapper: true,
usesPlugin: true
)
rtPublishBuildInfo(
serverId: "Artifactory Prod"
)
}
}
Expected behavior Build info is being published correctly to Artifactory.
Versions
- Gradle Artifactory plugin version: 4.18.0, 4.21.0 (tried both versions and ended up with the same error
- Operating system: Linux
- Artifactory Version: 7.10.5
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Gradle Artifactory Plugin - JFrog - JFrog Documentation
The Gradle Artifactory Plugin allows you to deploy your build artifacts and build information to Artifactory and also to resolve your build ......
Read more >Artifact is not published using gradle and artifactory plugin
The code seems to work fine but actually only the build info are published. The zip is not: Deploying build descriptor to: ...
Read more >com.jfrog.artifactory - Gradle Plugin Portal
Version 4.30.1 (latest). Created 15 December 2022. JFrog Gradle plugin for Build Info extraction and Artifactory publishing. Other versions.
Read more >Artifactory plugin can't publish build info for Gradle builds
Most of the docs and examples I've found online that integrate Gradle, Jenkins and Artifactory assume that you are using a freestyle job ......
Read more >Re: [Artifactory-users] Publishing Build Info via Gradle post ...
Re: [Artifactory-users] Publishing Build Info via Gradle post milestone-3 ... parentFile.mkdirs() println "Downloading the latest Artifactory plugin to ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@e88z4 Did you ever resolve this? I have the same issue. I suspect that our maven repository does not allow publishing
.json
files (only.pom
or.jar
). I do not see a way in the docs to configure the extension of the build info file.I would also be happy to turn off build info completely with
publishBuildInfo
that the docs talk about https://www.jfrog.com/confluence/display/JFROG/Gradle+Artifactory+PluginHowever this doesn’t seem to be supported in the Gradle Kotlin DSL. There is
setPublishPom
andsetPublishArtifacts
but nopublishBuildInfo
orsetPublishBuildInfo
.@e88z4 & @raptium The latest plugin version can be found here: https://plugins.gradle.org/plugin/com.jfrog.artifactory
bintray is deprecated and there you will not found any new version.