public abstract class OneShotProvisioner<T extends OneShotSlave> extends Object implements hudson.ExtensionPoint
OneShotSlaves.
Plugins to manage lightweight agents can use this extension point to determine jobs which require.| Constructor and Description |
|---|
OneShotProvisioner() |
| Modifier and Type | Method and Description |
|---|---|
static List<OneShotProvisioner> |
all() |
abstract boolean |
canRun(hudson.model.Queue.Item item)
Determine if the underlying infrastructure has enough resources to create a slave
for this $
Queue.Item. |
abstract T |
prepareExecutorFor(hudson.model.Queue.BuildableItem item)
Prepare a $
OneShotSlave to run this $Queue.BuildableItem. |
abstract boolean |
usesOneShotExecutor(hudson.model.Queue.Item item)
Determine if this $
Queue.Item do rely on One-Shot executors, and should be
handled by this specific provisioner. |
public abstract boolean usesOneShotExecutor(hudson.model.Queue.Item item)
Queue.Item do rely on One-Shot executors, and should be
handled by this specific provisioner.public abstract boolean canRun(hudson.model.Queue.Item item)
Queue.Item.
Implementation can rely on this to reduce concurrent executors on a static infrastructure, or to schedule new resources on an elastic one.
public abstract T prepareExecutorFor(hudson.model.Queue.BuildableItem item) throws Exception
OneShotSlave to run this $Queue.BuildableItem. The actual
slave isn't launched, just prepared which means we can use it's node name as
a label to for assignment. Implementation should create adequate OneShotSlave
derived class but not run any actual provisioning, which will get postponed
until the run has started and OneShotSlave.doActualLaunch(TaskListener) is ran.Exceptionpublic static List<OneShotProvisioner> all()
Copyright © 2016. All rights reserved.