2
votes

I am interested in figuring out the best way to deploy a build from artifactory. Currently I am generating a lot of binaries and dumping them on a repository in artifactory.

i want to find a way through jenkins, which allows me to select the builds from build jobs that have uploaded the binaries to artifactory, and redeploy that.

I assumed that jenkins jobs that does artifact upload keeps track of a url to which it is uploading. And then other jobs can somehow make use of these urls/locations via a parameterized job to collect and deploy these builds.

1

1 Answers

0
votes

You should use the Artifactory Jenkins plugin for this.
The Jenkins Artifactory Plugin brings Artifactory's Build Integration support to Jenkins. This integration allows your build jobs to deploy artifacts automatically to Artifactory and have them linked to the build job that created them. As part of deployment additional information is recorded by the plugin to give you full visibility of deployed artifacts, used dependencies and information about original build environment. As an important side affect the plugin also supports optimized end-of-build-only deployment.

Once you have all the information about the artifacts produced by your build inside Artifactory, you can use the REST API in order retrieve them from Artifactory.
For example the Build Info API will provide you all the information about the artifacts produced by a specific build run. You can use the provided information in order to download the artifacts from Artifactory, as part of your deployment process.