Slave Setup Plugin

Skip to end of metadata
Go to start of metadata

Plugin Information

Plugin ID slave-setup Changes In Latest Release
Since Latest Release
Latest Release
Latest Release Date
Required Core
Dependencies
1.9 (archives)
Jun 17, 2015
1.442
Source Code
Issue Tracking
Pull Requests
Maintainer(s)
GitHub
Open Issues
Pull Requests
Kohsuke Kawaguchi (id: kohsuke)
Frederik Fromm (id: ffromm)
Usage Installations 2014-Aug 1225
2014-Sep 1275
2014-Oct 1307
2014-Nov 1340
2014-Dec 1346
2015-Jan 1402
2015-Feb 1476
2015-Mar 1538
2015-Apr 1551
2015-May 1561
2015-Jun 1592
2015-Jul 1664

This plugin prepares slaves for build execution by letting you copy files and execute scripts before the slave gets used.

The slave setup plugin gets executed for a slave, if the given label expression matches and on:

  • Jenkins startup as a slave gets connected.
  • Save of the Jenkins configuration page if the "deploy on save now" checkox is checked.
  • New or re-connection of a slave.

When you install this plugin, it adds a new system configuration section that lets you specify a list of slave setup items. Each of them have to following properties:

Property Description Example
pre-launch script Name of a pre-launch script relative to the jenkins home directory. This can be used to start the slave machine, before Jenkins tries to ssh it. ./prelaunch.sh
prepare script Name of a prepare script relative to the jenkins home directory (not the setup files directory, this has changed in v1.6). This can be used to aggregate files into the setup files directory, patch them, pack them, and so on... ./prepare_files.sh
setup files directory Absolute path to the directory that will be copied to the slave.  The contents of this directory are copied to the home directory of the slave. /var/jenkins/devSlaveFiles
setup script after copy Name of the script that should be executed on the slave after all files are copied. The script should be part of the files to copy. ./slave_setup.sh
deploy on save now If checked, this slave setup item will be executed on save of the jenkins configuration page. checked
Label Expression Like jobs a slave setup item can be configured to be executed only on the slaves that match the Label Expression. "slaves", "!selenium", "slave1 OR slave2"

First the directory gets copied, then the script gets run. The execution of the script is reported to the slave log. When it fails, the slave is not marked as online, so ill-prepared slaves never enter the slave pool.

This provides the administrator of the system an opportunity to prepare slaves to the state suitable for build execution. This works particularly well in conjunction with tools like Puppet that has higher-level support for this kind of task.

Changelog

Version 1.9 (June 17, 2015)

  • Fixed issue #28297 - NPE in pre-launch Script for Jenkins Versions bigger than 1.609

Version 1.8 (September 23, 2014)

  • Fix a bug when Slave could not be started of no labels of the pre-launch Scripts match.

Version 1.8 (September 23, 2014)

  • Fix a bug when Slave could not be started of no labels of the pre-launch Scripts match.

Version 1.7 (September 22, 2014)

  • Expose NODE_TO_SETUP_NAME and NODE_TO_SETUP_LABELS (issue #24107)
  • Help files are displayed now
  • Possibility to add pre-launch scripts which will be executed before the slave is launched

Version 1.6 (July 2, 2012)

  • Fixed error on using empty Slave Setup Config Item.

Version 1.5 (June 18, 2012)

  • Added the possibility to create a list of slave setup items to support different setups.
  • Added field for prepare script to provide the possibility to prepare the files to be copied to a slave.

Version 1.4 (Mar 08, 2012)

  • Added checkbox to enable setup deployment on save of the system configuration page.
  • Added label field to filter slaves to be used for setup deployment.

Version 1.0 (Sep 17, 2011)

  • Initial version

Labels

Edit
plugin-cluster plugin-cluster Delete
plugin-slaves plugin-slaves Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Add Comment