View scripted Cloud on the plugin site for more information.
Add script based slave VM management to Jenkins to use virtual machines as slaves
This plugin adds to the Jenkins CI a way to control virtual machines through scripts. It takes two scripts: one for starting
NOTE: A great deal of thanks to the authors of the vshpere cloud Plugin; their
code was heavily copied to make this plugin.
scripted Cloud Configuration
The first step is to add a new "Cloud" in the Jenkins "Configure System" menu based on "scripted Cloud". Enter its description, start and stop scripts.
Start script is called while launching slave of this cloud. Its expected that this script ensures that VM is up and running. Stop script is called after
the job has been done.
scripted Slave Configuration
- scripted Cloud Instance: This is the name of the scripted Cloud that you want to use.
- Virtual Machine Name: The name of the virtual machine as it appears in scripted.
- Snapshot Name: (optional) the name of the snapshot to use.
- Force VM Launch: Launches the virtual machine when necessary.
- Disconnect after Limited Builds: Will force the slave agent to disconnect after the specified number of builds have been performed,
triggering the disconnect action.
- What to do when the slave is disconnected: Action to perform (Shutdown, Revert, Reset, Nothing) when the slave is disconnected, either
manually or via Jenkins.
Lot of environment variables are set which are available to start and stop scripts. These indicate the inputs from VM configuration.