@Extension
public class ProvisionQueueListener
extends hudson.model.queue.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.构造器和说明 |
---|
ProvisionQueueListener() |
限定符和类型 | 方法和说明 |
---|---|
void |
onEnterBuildable(hudson.model.Queue.BuildableItem item) |
void |
onLeft(hudson.model.Queue.LeftItem item)
If item is canceled, remove the executor we created for it.
|
public void onEnterBuildable(hudson.model.Queue.BuildableItem item)
onEnterBuildable
在类中 hudson.model.queue.QueueListener
public void onLeft(hudson.model.Queue.LeftItem item)
onLeft
在类中 hudson.model.queue.QueueListener
Copyright © 2016–2018. All rights reserved.