Class PromotedEnvVarTokenMacro
java.lang.Object
org.jenkinsci.plugins.tokenmacro.TokenMacro
org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro
hudson.plugins.promoted_builds.tokenmacro.PromotedEnvVarTokenMacro
- All Implemented Interfaces:
ExtensionPoint
@Extension(optional=true)
public class PromotedEnvVarTokenMacro
extends org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro
Retrieves an environment variable from the
Promotion
build.
The Promotion
build is being determined by the current Executor
,
so the macro is tolerant against context switches when the variable is being
resolved against the parent build instead of the Promotion
.
In other cases the macro will behave similarly to EnvironmentVariableMacro
from
Token Macro plugin.- Author:
- Oleg Nenashev
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro
org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro.Parameter
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
Fields inherited from class org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro
escapeHtml
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
acceptsMacroName
(String macroName) evaluate
(AbstractBuild<?, ?> build, TaskListener listener, String macroName) Methods inherited from class org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro
evaluate, evaluate, evaluate, handlesHtmlEscapeInternally, hasNestedContent
Methods inherited from class org.jenkinsci.plugins.tokenmacro.TokenMacro
all, expand, expand, expand, expand, expandAll, expandAll, expandAll, expandAll, getAcceptedMacroNames, getAutoCompleteList, getPreviousRun, getWorkspace
-
Field Details
-
var
-
-
Constructor Details
-
PromotedEnvVarTokenMacro
public PromotedEnvVarTokenMacro()
-
-
Method Details
-
evaluate
public String evaluate(AbstractBuild<?, ?> build, TaskListener listener, String macroName) throws org.jenkinsci.plugins.tokenmacro.MacroEvaluationException, IOException, InterruptedException- Specified by:
evaluate
in classorg.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro
- Throws:
org.jenkinsci.plugins.tokenmacro.MacroEvaluationException
IOException
InterruptedException
-
acceptsMacroName
- Specified by:
acceptsMacroName
in classorg.jenkinsci.plugins.tokenmacro.TokenMacro
-