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 classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
getScript
(org.jenkinsci.plugins.workflow.cps.CpsScript cpsScript) ONLY TO BE RUN FROM WITHIN A CPS THREAD.boolean
hasScmContext
(org.jenkinsci.plugins.workflow.cps.CpsScript script) void
initialize
(Map<String, DeclarativeOption> options, boolean explicitAgentInStage) boolean
boolean
boolean
reuseRootAgent
(Map<String, DeclarativeOption> options) void
setDoCheckout
(boolean doCheckout) void
setInStage
(boolean inStage) void
setSubdirectory
(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:WithScriptDescribable
ONLY 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:
getScript
in 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:
getDescriptor
in interfaceDescribable<A extends DeclarativeAgent<A>>
- Overrides:
getDescriptor
in classWithScriptDescribable<A extends DeclarativeAgent<A>>
-