Lets you configure tools so that agents will install them on demand whenever running a job that needs them. This could be especially useful when running a large farm of agents in a cloud which all start with a minimal operating system configuration.
Several techniques are already supported: run arbitrary shell command; download & unpack archive from arbitrary URL; download and install official Oracle JDK, Ant release, or Maven release.
The configuration is part of a tool; a project owner just picks a tool (JDK, Ant, Maven, ...) by name as usual, and may observe a build running some extra steps if it needs to perform an installation, but it is otherwise transparent. Installers can be limited to agents marked with a label.
Jenkins 2.7.1 on
localhost:8080 with no executors.
One JNLP agent node
ubuntu-vbox with one executor and Remote FS root set to
- JDK installations has one entry with name
JDK 6and a JDK installer set to 6u13.
- Ant installation has one entry with name
Ant 1.7.1and an Ant installer set to 1.7.1.
Freestyle project, no SCM. Two build steps:
Execute shell with Command:
- Invoke Ant with Targets set to
An Ubuntu 8.10 server installation inside VirtualBox (NAT networking) with only
default-jre-headless installed and user
Expected project console output
- Install tools from an SCM such as Subversion.
- Upload a tool archive directly into Jenkins' web GUI.
- Cache downloaded tools on master to avoid excess network traffic. (Already done for JDKs.)
Related: Tool Environment Plugin
Adding new versions
Jenkins gets the information where to download the versions via a JSON download from the internet.
The JSON data for the tools are stored in the files http://mirrors.jenkins-ci.org/updates/updates/, so adding a new version of an existing tool would require a path to the related file. The JSON data for some tools is created by
backend/crawler in Jenkins sources.
More tools needed!
More things should extend
ToolInstallation for this system to be really useful. An incomplete list:
- Languages & frameworks
- MSBuild: JENKINS-4120
- Ant, Maven, Gradle, Buckminster, SCons, WAS Builder, RAD Builder, STAF seem done
- Mercurial available as of 1.18
- unnecessary for SVN, which Jenkins runs from Java
Just in case you cannot find a ToolInstaller/ToolInstallation for your tool, there are also generic plugins which can be configured in flexible ways: