public class BuildStatusAction extends InvisibleAction
| Constructor and Description |
|---|
BuildStatusAction(Run<?,?> run,
String targetUrl,
List<BuildStageModel> stageList)
Construct a BuildStatusAction
|
| Modifier and Type | Method and Description |
|---|---|
void |
addBuildStatus(String stageName)
Sends pending notifications for the start of a stage
|
void |
addGenericNofifier(BuildNotifier notifier) |
void |
addGithubNotifier(GithubNotificationConfig config)
Attempts to add a GitHub notifier
|
void |
addInfluxDbNotifier(InfluxDbNotifierConfig influxDbNotifierConfig)
Attempts to add an influx db notifier
|
void |
addStatsdNotifier(StatsdNotifierConfig statsdNotifierConfig)
Attempts to add an Statsd notifier
|
void |
close()
Cleans up by sending "complete" status to any steps that are currently
pending.
|
String |
getBranchName() |
String |
getJobName() |
String |
getRepoName() |
String |
getRepoOwner() |
boolean |
isIsDeclarativePipeline()
Sets flag indicating whether notifications are for a declarative pipeline
|
void |
sendNonStageError(String nodeName)
Sends notifications for an error that happens outside of a stage
|
void |
sendNotifications(BuildNotifier notifier)
Sends all saved notifications to a notifier
|
void |
setBranchName(String branchName) |
void |
setIsDeclarativePipeline(boolean isDeclarativePipeline) |
void |
setRepoName(String repoName) |
void |
setRepoOwner(String repoOwner) |
void |
updateBuildStatusForJob(BuildState buildState,
Map<String,Object> parameters)
Sends notifications for final build status
|
void |
updateBuildStatusForStage(String nodeName,
BuildState buildState)
Sends notifications for a completed stage
|
void |
updateBuildStatusForStage(String nodeName,
BuildState buildState,
long time)
Sends notifications for a completed stage
|
getDisplayName, getIconFileName, getUrlNamepublic BuildStatusAction(Run<?,?> run, String targetUrl, List<BuildStageModel> stageList)
run - the buildtargetUrl - link back to JenkinsstageList - list of stages if knownpublic String getJobName()
public String getRepoOwner()
public void setRepoOwner(String repoOwner)
public String getRepoName()
public void setRepoName(String repoName)
public String getBranchName()
public void setBranchName(String branchName)
public void close()
public boolean isIsDeclarativePipeline()
public void setIsDeclarativePipeline(boolean isDeclarativePipeline)
public void addGithubNotifier(GithubNotificationConfig config)
config - GitHub notifier configpublic void addInfluxDbNotifier(InfluxDbNotifierConfig influxDbNotifierConfig)
influxDbNotifierConfig - influx db notifier configpublic void addStatsdNotifier(StatsdNotifierConfig statsdNotifierConfig)
statsdNotifierConfig - Statsd notifier configpublic void addGenericNofifier(BuildNotifier notifier)
public void sendNotifications(BuildNotifier notifier)
notifier - notifier to send topublic void addBuildStatus(String stageName)
stageName - stage namepublic void updateBuildStatusForStage(String nodeName, BuildState buildState, long time)
nodeName - node namebuildState - build statetime - stage timepublic void updateBuildStatusForStage(String nodeName, BuildState buildState)
nodeName - node namebuildState - build statepublic void updateBuildStatusForJob(BuildState buildState, Map<String,Object> parameters)
buildState - final build stateparameters - build parameterspublic void sendNonStageError(String nodeName)
nodeName - name of node that failedCopyright © 2016–2019. All rights reserved.