Why doesn’t my build have paths to published artifacts even though it did upload them?

Adi Vizgan
2019-07-14 14:49

Subject

In this article, we would explain the way that Artifactory maps published artifacts to builds and the possible reason that there are no paths to published artifacts in a build even though they were uploaded through the build.

Description

When publishing a build, Artifactory uses the properties "build.name" and "build.number" in order to connect the artifacts deployed to their respective builds.
When using the Jenkins Artifactory plugin, it will automatically create these properties and set them to the published artifacts.
If you are uploading a build not via the Jenkins Artifactory plugin – via the REST API, the JFrog CLI, or with replication of the "artifactory-build-info" repository and the local repository that contains the artifacts, these properties will need to be assigned manually to the published artifacts.

Resolution

In order to set the path to a published artifact to its respective build, you will need to assign the properties "build.name" and "build.number" to it manually with the correct values of the build you want to connect them to.
If you would like to automate this process, you can use the Set Item Properties REST API call to attach these properties to the artifacts you want to attach to the build.
For setting these properties and further information regarding the JFrog CLI, you may visit the JFrog CLI wiki page.