Package hudson.plugins.git
Class GitBranchTokenMacro
java.lang.Object
org.jenkinsci.plugins.tokenmacro.TokenMacro
org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro
hudson.plugins.git.GitBranchTokenMacro
- All Implemented Interfaces:
ExtensionPoint
@Extension(optional=true)
public class GitBranchTokenMacro
extends org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro
GIT_BRANCH token that expands to the branch(es) that was built.- Author:
- Kohsuke Kawaguchi
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro
org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro.ParameterNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanIf true, list up all the branches not just the first one.booleanIf true, include all the prefixes of the branch nameFields inherited from class org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro
escapeHtml -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanacceptsMacroName(String macroName) evaluate(AbstractBuild<?, ?> context, TaskListener listener, String macroName) evaluate(Run<?, ?> context, FilePath workspace, TaskListener listener, String macroName) Methods inherited from class org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro
evaluate, evaluate, handlesHtmlEscapeInternally, hasNestedContentMethods inherited from class org.jenkinsci.plugins.tokenmacro.TokenMacro
all, expand, expand, expand, expand, expandAll, expandAll, expandAll, expandAll, getAcceptedMacroNames, getAutoCompleteList, getPreviousRun, getWorkspace
-
Field Details
-
all
public boolean allIf true, list up all the branches not just the first one. -
fullName
public boolean fullNameIf true, include all the prefixes of the branch name
-
-
Constructor Details
-
GitBranchTokenMacro
public GitBranchTokenMacro()
-
-
Method Details
-
acceptsMacroName
- Specified by:
acceptsMacroNamein classorg.jenkinsci.plugins.tokenmacro.TokenMacro
-
evaluate
public String evaluate(AbstractBuild<?, ?> context, TaskListener listener, String macroName) throws org.jenkinsci.plugins.tokenmacro.MacroEvaluationException, IOException, InterruptedException- Specified by:
evaluatein classorg.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro- Throws:
org.jenkinsci.plugins.tokenmacro.MacroEvaluationExceptionIOExceptionInterruptedException
-
evaluate
public String evaluate(Run<?, ?> context, FilePath workspace, TaskListener listener, String macroName) throws org.jenkinsci.plugins.tokenmacro.MacroEvaluationException, IOException, InterruptedException- Overrides:
evaluatein classorg.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro- Throws:
org.jenkinsci.plugins.tokenmacro.MacroEvaluationExceptionIOExceptionInterruptedException
-