public class BuildStatusAction
extends hudson.model.InvisibleAction
| Constructor and Description |
|---|
BuildStatusAction(String jobName,
String targetUrl,
List<String> stageList)
Construct a BuildStatusAction
|
| Modifier and Type | Method and Description |
|---|---|
void |
addBuildStatus(String stageName)
Sends pending notifications for the start of a stage
|
void |
addGithubNofifier(GithubNotificationConfig config)
Attempts to add a github notifier
|
void |
addInfluxDbNotifier(InfluxDbNotifierConfig influxDbNotifierConfig)
Attempts to add an influx db notifier
|
void |
close()
Cleans up by sending "complete" status to any steps that are currently
pending.
|
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 |
sendNotications(BuildNotifier notifier)
Sends all saved notifications to a notifier
|
void |
setIsDeclarativePipeline(boolean isDeclarativePipeline) |
void |
updateBuildStatusForJob(BuildState buildState,
long buildDuration,
long blockedDuration)
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
|
public BuildStatusAction(String jobName, String targetUrl, List<String> stageList) throws IOException
jobName - the name of the job status is fortargetUrl - link back to JenkinsstageList - list of stages if knownIOExceptionpublic void close()
public boolean isIsDeclarativePipeline()
public void setIsDeclarativePipeline(boolean isDeclarativePipeline)
public void addGithubNofifier(GithubNotificationConfig config)
config - github notifier configpublic void addInfluxDbNotifier(InfluxDbNotifierConfig influxDbNotifierConfig)
influxDbNotifierConfig - influx db notifier configpublic void sendNotications(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, long buildDuration, long blockedDuration)
buildState - final build statebuildDuration - build durationblockedDuration - time build was blocked before runningpublic void sendNonStageError(String nodeName)
nodeName - name of nodeCopyright © 2016–2019. All rights reserved.