conan-extensions icon indicating copy to clipboard operation
conan-extensions copied to clipboard

[question] Build info in Artifactory doesn't link to the conan packages in Artifactory

Open JanGerber opened this issue 5 years ago • 4 comments
trafficstars

For our builds we used the Artifactory plugin for Jenkins in combination with Conan. Additionally we push the build information to artifactory after uploading the Conan package to artifactory. The problem is that there are no artifacts in the build information.This makes it especially difficult for developers. You cannot jump directly from the build info in artifactory to the respective artifact in the artifactory tree.

We use the follwowing code to upload the conan package and publish the build info to artifactory.

String cmd = "upload TestProj/*@user/develop --all -r " + artifactoryServerName + " --confirm "
def b = artifactoryConanClient.run(command: cmd, buildInfo: buildInfo)
artifactoryServer.publishBuildInfo b

Artifactory shows that there are three artifacts: Artifactory Build Info

But if I open the package there is no link to the artifacts:

Artifactory build info - published modules

Does anyone else have similar problems or see a bug in my code?

Versions: Artifactory: 6.17.0 artifactoryPluginVersion: 3.6.1 Conan: 1.23.0

JanGerber avatar Apr 24 '20 06:04 JanGerber

Hi @JanGerber, There are some issues (that we hope are fixed soon) when using BuildInfo with Conan packages like if you re-upload files that are shared between different builds (like conanfile.py for example) the path to the artifact may be lost. Regarding your case, could you give me more details of the complete process that makes you get to that? Is it always happening for all builds? Maybe I could try to reproduce it. Also, I would recommend you to give a try to the conan_build_info --v2 that generates the build info with the information obtained from the lockfiles. In this github repository you will find some Jenkinsfiles that use the conan_build_info --v2 (not yet implemented in the Artifactory plugin) that might be useful for you.

czoido avatar Apr 24 '20 15:04 czoido

I am having the same problem using conan_build_info --v2 to publish the build info. The repo path is unpopulated in Artifactory build info for the uploaded artefacts ("undefined/No path found (externally resolved or deleted/overwritten)" in the repo path field). However, the repo paths for the dependencies are resolved. I've attached a sample of the published build info.

build_info.json.txt

djeverett avatar Feb 04 '21 22:02 djeverett

Hi @djeverett, This is related to a bug in Artifactory handling of BuildInfos. The problem is that for example, if you publish two BuildInfo's that share an artifact with the same checksum (for example, conanfile.py uploading new packages for the same recipe) only the artifact's path for the last BuildInfo is going to be correctly stored. This is something Artifactory team is working on to fix soon. I'm not sure when it will be released but Conan's BuildInfo is already prepared to new implementation of the BuildInfo so it should work right away using the new Artifactory version that solves this issue.

czoido avatar Feb 17 '21 14:02 czoido

Moved this ticket to the conan-extensions repo, where the new BuildInfo commands are being developed for 2.0

memsharded avatar May 31 '23 14:05 memsharded