jenkins the definitive guide

(Jeff_L) #1

deployment as part of a build promotion process, configuring an automatic deployment to a different
repository when certain quality metrics have been satisfied, for example.


Figure 5.42. Redeploying an artifact


This approach will work fine for any Enterprise Repository manager. However, if you are using
Artifactory, you may prefer to install the Jenkins Artifactory Plugin^11 , which provides tighter two-
way integration with the Artifactory Enterprise Repository Manager. It works by sending additional
information to the Artifactory server during the deployment, allowing the server to refer back to the
precise build that generated a given artifact. Once you have installed the plugin, you can activate it in
your Maven build job by ticking the “Deploy artifacts to Artifactory” option in the Post-build Actions.
Then you choose what repositories your project should deploy to from a list of repositories on the server,
along with the username and password required to perform the deployment (see Figure 5.43, “Deploying
to Artifactory from Jenkins”).


Figure 5.43. Deploying to Artifactory from Jenkins


Your build job will now automatically deploy to Artifactory. In addition, a link to the artifact on the
server will now be displayed on the build job home and build results pages (see Figure 5.44, “Jenkins
displays a link to the corresponding Artifactory repository”).


(^11) http://wiki.jenkins-ci.org/display/JENKINS/Artifactory+Plugin

Free download pdf