public class BuildStatusAction
extends hudson.model.InvisibleAction
Constructor and Description |
---|
BuildStatusAction(String jobName,
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 |
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.
|
String |
getBranchName() |
String |
getJobName() |
String |
getRepoName() |
String |
getRepoOwner() |
boolean |
isIsDeclarativePipeline() |
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 |
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
|
public BuildStatusAction(String jobName, String targetUrl, List<BuildStageModel> stageList)
jobName
- the name of the job status is fortargetUrl
- 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 addGithubNofifier(GithubNotificationConfig config)
config
- github notifier configpublic void addInfluxDbNotifier(InfluxDbNotifierConfig influxDbNotifierConfig)
influxDbNotifierConfig
- influx db notifier configpublic void addGenericNofifier(BuildNotifier notifier)
public 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, Map<String,Object> parameters)
buildState
- final build stateparameters
- build parameterspublic void sendNonStageError(String nodeName)
nodeName
- name of nodeCopyright © 2016–2018. All rights reserved.