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.Parameter
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
FieldsModifier and TypeFieldDescriptionboolean
If true, list up all the branches not just the first one.boolean
If 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 TypeMethodDescriptionboolean
acceptsMacroName
(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, 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
-
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:
acceptsMacroName
in 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:
evaluate
in classorg.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro
- Throws:
org.jenkinsci.plugins.tokenmacro.MacroEvaluationException
IOException
InterruptedException
-
evaluate
public String evaluate(Run<?, ?> context, FilePath workspace, TaskListener listener, String macroName) throws org.jenkinsci.plugins.tokenmacro.MacroEvaluationException, IOException, InterruptedException- Overrides:
evaluate
in classorg.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro
- Throws:
org.jenkinsci.plugins.tokenmacro.MacroEvaluationException
IOException
InterruptedException
-