Class OneShotSlave

All Implemented Interfaces:
ExtensionPoint, Describable<Node>, ModelObject, PersistenceRoot, ReconfigurableDescribable<Node>, Saveable, SearchableModelObject, SearchItem, AccessControlled, EphemeralNode, Serializable, OnMaster
Direct Known Subclasses:
DockerSlave

public abstract class OneShotSlave extends Slave implements EphemeralNode
A slave that is designed to be used only once, for a specific $Run, and as such has a life cycle to fully match the Run's one.

Provisioning such a slave should be a lightweight process, so one can provision them at any time and concurrently to match $Queue load. Typical usage is Docker container based Jenkins agents.

Actual launch of the Slave is postponed until a $Run is created, so we can have a 1:1 match between Run and Executor lifecycle:

  • dump the launch log in build log.
  • mark the build as $Result.NOT_BUILT on launch failure.
  • shut down and remove the Executor on build completion
See Also: