Class ProvisionQueueListener

java.lang.Object
hudson.model.queue.QueueListener
it.dockins.dockerslaves.ProvisionQueueListener
All Implemented Interfaces:
ExtensionPoint

@Extension public class ProvisionQueueListener extends QueueListener
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.