Class GroovyPostbuildRecorder.BadgeManager
- java.lang.Object
-
- org.jvnet.hudson.plugins.groovypostbuild.GroovyPostbuildRecorder.BadgeManager
-
- Enclosing class:
- GroovyPostbuildRecorder
public static class GroovyPostbuildRecorder.BadgeManager extends Object
-
-
Constructor Summary
Constructors Constructor Description BadgeManager(Run<?,?> build, TaskListener listener, Result scriptFailureResult)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addBadge(String icon, String text)
void
addBadge(String icon, String text, String link)
void
addErrorBadge(String text)
void
addHtmlBadge(String html)
void
addInfoBadge(String text)
void
addShortText(String text)
void
addShortText(String text, String color, String background, String border, String borderColor)
void
addWarningBadge(String text)
void
buildAborted()
void
buildFailure()
boolean
buildIsA(Class<? extends AbstractBuild<?,?>> buildClass)
Test whether the current build is specified type.void
buildNotBuilt()
void
buildScriptFailed(Exception e)
void
buildSuccess()
void
buildUnstable()
boolean
contains(File f, String regexp)
Deprecated.boolean
contains(File f, Charset charset, String regexp)
Deprecated.com.jenkinsci.plugins.badge.action.BadgeSummaryAction
createSummary(String icon)
Run<?,?>
getBuild()
String
getEnvVariable(String key)
EnvVars
getEnvVars()
Hudson
getHudson()
Deprecated.use $getJenkins()
Jenkins
getJenkins()
TaskListener
getListener()
Matcher
getLogMatcher(String regexp)
Matcher
getMatcher(File f, String regexp)
Deprecated.Matcher
getMatcher(File f, Charset charset, String regexp)
Deprecated.Matcher
getMatcher(Reader r, String regexp)
String
getResult()
boolean
logContains(String regexp)
void
println(String string)
void
removeBadge(int index)
void
removeBadges()
void
removeSummaries()
void
removeSummary(int index)
void
setBuild(Run<?,?> build)
boolean
setBuildNumber(int buildNumber)
-
-
-
Constructor Detail
-
BadgeManager
public BadgeManager(Run<?,?> build, TaskListener listener, Result scriptFailureResult)
-
-
Method Detail
-
getEnvVars
public EnvVars getEnvVars()
-
println
public void println(String string)
-
getEnvVariable
public String getEnvVariable(String key) throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
getHudson
@Deprecated public Hudson getHudson()
Deprecated.use $getJenkins()
- Returns:
- the jenkins insance
-
getJenkins
public Jenkins getJenkins()
-
getBuild
public Run<?,?> getBuild()
-
setBuild
public void setBuild(Run<?,?> build)
-
setBuildNumber
public boolean setBuildNumber(int buildNumber)
-
getListener
public TaskListener getListener()
-
addShortText
public void addShortText(String text)
-
addShortText
public void addShortText(String text, String color, String background, String border, String borderColor)
-
addInfoBadge
public void addInfoBadge(String text)
-
addWarningBadge
public void addWarningBadge(String text)
-
addErrorBadge
public void addErrorBadge(String text)
-
addHtmlBadge
public void addHtmlBadge(String html)
-
getResult
public String getResult()
-
removeBadges
public void removeBadges()
-
removeBadge
public void removeBadge(int index)
-
createSummary
public com.jenkinsci.plugins.badge.action.BadgeSummaryAction createSummary(String icon)
-
removeSummaries
public void removeSummaries()
-
removeSummary
public void removeSummary(int index)
-
buildUnstable
public void buildUnstable()
-
buildFailure
public void buildFailure()
-
buildSuccess
public void buildSuccess()
-
buildAborted
public void buildAborted()
-
buildNotBuilt
public void buildNotBuilt()
-
buildScriptFailed
public void buildScriptFailed(Exception e)
-
logContains
public boolean logContains(String regexp)
-
contains
@Deprecated public boolean contains(File f, String regexp)
Deprecated.
-
contains
@Deprecated public boolean contains(File f, Charset charset, String regexp)
Deprecated.
-
getMatcher
@Deprecated public Matcher getMatcher(File f, String regexp)
Deprecated.
-
getMatcher
@Deprecated public Matcher getMatcher(File f, Charset charset, String regexp)
Deprecated.
-
buildIsA
public boolean buildIsA(Class<? extends AbstractBuild<?,?>> buildClass)
Test whether the current build is specified type.- Parameters:
buildClass
-- Returns:
- true if the current build is an instance of buildClass
-
-