Open AndreyGranovsky opened 8 months ago
hi @AndreyGranovsky, thanks for the report.
Indeed, virtual and remote repositories in Artifactory work a bit different and they are not so tested from our side.
Have you tried the local Artifactory repository to create the build info instead of the virtual one? That might solve the issue.
Thanks
Hi @danimtb, The Conan remote that is configured is a Virtual repository on Artifactory that contains a local+remote repositories.
During the "conan art:build-info create" a local repository was passed under the
Hi @AndreyGranovsky,
Thanks for reporting. I have been checking this and apparently it works fine for me as long as I pass the local repository to the art:build-info
commands. I'm providing here the instructions for a minimal working example with the BuildInfo, can you check if there are any steps that you are doing in a different way?
This is what I did:
develop
, the repo name in Arfifactory is conan-local
. So I did:conan remote add develop http://localhost:8081/artifactory/api/conan/conan-local
# create a package with a dependency for the build info
mkdir liba
cd liba
conan new cmake_lib -d name=liba -d version=1.0
cd ..
mkdir mypkg
cd mypkg
conan new cmake_lib -d name=mypkg -d version=1.0 -d requires=liba/1.0
cd ..
# start with a clean repo
conan remove "*" -r=develop -c
conan remove "liba*" -c
conan remove "mypkg*" -c
conan create liba -s build_type=Release --build="liba*"
conan upload "liba*" -r=develop -c
# this is just to ensure that it will check for the liba info in the repo
conan remove "liba*" -c
conan create mypkg --format=json -s build_type=Release --build="mypkg*" -r=develop > create_release.json
conan upload "mypkg*" -r=develop -c
# IMPORTANT! It's very important to pass there conan-local, that is the name of the repo in artifactory
# and will provide the path to set the property, not develop (that is the name of the conan remote)
conan art:build-info create create_release.json release_build 1 conan-local --url=http://localhost:8081/artifactory --user=admin --password=password --with-dependencies > release_build.json
conan art:build-info upload release_build.json --url=http://localhost:8081/artifactory --user=admin --password=password
# the BuildInfo is uploaded fine
Could you please check?
When using the "conan art:build-info upload", according to the documentation, we should provide the repository where the packages were uploaded in Artifactory (which is not the same one as the Conan remote name, which is a virtual repository).
Once we run the "conan art:build-info upload" command, it fails due to the package not being found as it is not stored in the virtual repository location (please note that adding properties is supported only for local and local-cache repositories). This occurs because, during the build upload process, it attempts to use the path of the virtual repository rather than the local repository where the packages were initially uploaded. For example: