Package it.dockins.dockerslaves
Class ProvisionQueueListener
java.lang.Object
hudson.model.queue.QueueListener
it.dockins.dockerslaves.ProvisionQueueListener
- All Implemented Interfaces:
ExtensionPoint
Cloud API is designed to launch virtual machines, which is an heavy process, so relies on
NodeProvisioner to determine when a new slave is required. Here we want the slave to start just as a job
enter the build queue. As an alternative we listen the Queue for Jobs to get scheduled, and when label match
immediately start a fresh new container executor with a unique label to enforce exclusive usage.-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidonLeft(Queue.LeftItem item) If item is canceled, remove the executor we created for it.Methods inherited from class hudson.model.queue.QueueListener
all, onEnterBlocked, onEnterWaiting, onLeaveBlocked, onLeaveBuildable, onLeaveWaiting
-
Constructor Details
-
ProvisionQueueListener
public ProvisionQueueListener()
-
-
Method Details
-
onEnterBuildable
- Overrides:
onEnterBuildablein classQueueListener
-
onLeft
If item is canceled, remove the executor we created for it.- Overrides:
onLeftin classQueueListener
-