Package hudson.plugins.git
Class GitRevisionTokenMacro
- java.lang.Object
-
- org.jenkinsci.plugins.tokenmacro.TokenMacro
-
- org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro
-
- hudson.plugins.git.GitRevisionTokenMacro
-
- All Implemented Interfaces:
ExtensionPoint
@Extension(optional=true) public class GitRevisionTokenMacro extends org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro
GIT_REVISION
token that expands to the SHA1 of the commit 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
Fields Modifier and Type Field Description int
length
Number of chars to use
-
Constructor Summary
Constructors Constructor Description GitRevisionTokenMacro()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
acceptsMacroName(String macroName)
String
evaluate(AbstractBuild<?,?> context, TaskListener listener, String macroName)
String
evaluate(Run<?,?> context, FilePath workspace, TaskListener listener, String macroName)
-
Methods inherited from class org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro
evaluate, evaluate, handlesHtmlEscapeInternally, hasNestedContent
-
-
-
-
Method Detail
-
acceptsMacroName
public boolean acceptsMacroName(String macroName)
- Specified by:
acceptsMacroName
in classorg.jenkinsci.plugins.tokenmacro.TokenMacro
-
evaluate
public String evaluate(Run<?,?> context, FilePath workspace, TaskListener listener, String macroName) throws org.jenkinsci.plugins.tokenmacro.MacroEvaluationException
- Overrides:
evaluate
in classorg.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro
- Throws:
org.jenkinsci.plugins.tokenmacro.MacroEvaluationException
-
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
-
-