Class DeclarativeAgent<A extends DeclarativeAgent<A>>
java.lang.Object
hudson.model.AbstractDescribableImpl<T>
org.jenkinsci.plugins.pipeline.modeldefinition.withscript.WithScriptDescribable<A>
org.jenkinsci.plugins.pipeline.modeldefinition.agent.DeclarativeAgent<A>
- All Implemented Interfaces:
ExtensionPoint,Describable<A>,Serializable
- Direct Known Subclasses:
RetryableDeclarativeAgent
public abstract class DeclarativeAgent<A extends DeclarativeAgent<A>>
extends WithScriptDescribable<A>
implements ExtensionPoint
Implementations for
DeclarativeAgentDescriptor - pluggable agent backends for Declarative Pipelines.- Author:
- Andrew Bayer
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidgetScript(org.jenkinsci.plugins.workflow.cps.CpsScript cpsScript) ONLY TO BE RUN FROM WITHIN A CPS THREAD.booleanhasScmContext(org.jenkinsci.plugins.workflow.cps.CpsScript script) voidinitialize(Map<String, DeclarativeOption> options, boolean explicitAgentInStage) booleanbooleanbooleanreuseRootAgent(Map<String, DeclarativeOption> options) voidsetDoCheckout(boolean doCheckout) voidsetInStage(boolean inStage) voidsetSubdirectory(String subdirectory)
-
Field Details
-
inStage
protected boolean inStage -
doCheckout
protected boolean doCheckout -
subdirectory
-
-
Constructor Details
-
DeclarativeAgent
public DeclarativeAgent()
-
-
Method Details
-
getScript
public WithScriptScript getScript(org.jenkinsci.plugins.workflow.cps.CpsScript cpsScript) throws Exception Description copied from class:WithScriptDescribableONLY TO BE RUN FROM WITHIN A CPS THREAD. Parses the script source and loads it. TODO: Decide if we want to cache the resulting objects or just *shrug* and re-parse them every time.- Overrides:
getScriptin classWithScriptDescribable<A extends DeclarativeAgent<A>>- Returns:
- The script object for this.
- Throws:
Exception- if the script source cannot be loaded or we're called from outside a CpsThread.
-
setInStage
public void setInStage(boolean inStage) -
isInStage
public boolean isInStage() -
initialize
-
reuseRootAgent
-
setDoCheckout
public void setDoCheckout(boolean doCheckout) -
isDoCheckout
public boolean isDoCheckout() -
setSubdirectory
-
getSubdirectory
-
copyFlags
-
hasScmContext
public boolean hasScmContext(org.jenkinsci.plugins.workflow.cps.CpsScript script) -
getDescriptor
- Specified by:
getDescriptorin interfaceDescribable<A extends DeclarativeAgent<A>>- Overrides:
getDescriptorin classWithScriptDescribable<A extends DeclarativeAgent<A>>
-