Jenkins : Using Artifactory for Configuring a Jenkins Build Environment

This page will help you setting up portable environment for building Jenkins

This setup is also suitable for meet-ups and hackathons

Setting up Artifactory

Since we are aiming to portable installation the best option to install Artifactory will be the zip archive. It sets up the $ARTIFACTORY_HOME directory (with all the settings and data) to be the installation folder. Naturally, Java is required to run Artifactory.

For portable setup it is also recommended to disable all backup configurations:

Setting up Maven to work with Artifactory and pre-populating the cache for offline access

Generate user settings.xml from Artifactory UI:


Build Jenkins as described on this page, using the generated settings.xml. Applying the settings file can be done in one of the following ways:

  • Override the default settings with the generated ones (by saving the generated file under $USER_HOME/.m2)
  • Instruct maven to use dedicated settings.xml file (by using -s or --settings argument with path to the generated file when running Maven). After successful build Artifactory will be populated with all the needed dependencies.

It's portable

Just copy the entire Artifactory folder to portable storage. You can then run Artifactory directly from it (once there is enough free space) by executing artifactory.bat / artifactory.sh. Once Artifactory is up, everyone on the LAN can build Jenkins by generating settings file as instructed above. No internet access required.

Please remember that once the IP address of the machine running Artifactory has changed, the settings file should be changed, or regenerated.

Attachments:

2012-06-21_155914.png (image/png)