@Extension(ordinal=11003.0)
public class BuildFailureScanner
extends hudson.model.listeners.RunListener<hudson.model.Run>
Modifier and Type | Field and Description |
---|---|
static int |
ORDINAL
The ordinal of this extension, one thousand below the GerritTrigger plugin.
|
Constructor and Description |
---|
BuildFailureScanner() |
Modifier and Type | Method and Description |
---|---|
static String |
createSlackMessage(List<FoundFailureCause> foundCauseList,
boolean notifySlackOfAllFailures,
List<String> slackFailureCauseCategories,
String buildName,
String buildNum,
String buildUrl,
PrintStream scanLog)
Function to create the message for Slack using build and BFA information.
|
static void |
initThreadPool()
Creates the shared thread pool after extensions have been made available.
|
void |
onCompleted(hudson.model.Run run,
hudson.model.TaskListener listener) |
void |
onFinalized(hudson.model.Run run) |
void |
onStarted(hudson.model.Run build,
hudson.model.TaskListener listener) |
static void |
scan(hudson.model.Run build,
PrintStream scanLog)
Performs a scan of the build, adds the
FailureCauseBuildAction and reports to the
StatisticsLogger . |
static void |
scanIfNotScanned(hudson.model.Run build,
PrintStream scanLog)
Scans the build if it should be scanned and it has not already been scanned.
|
public static final int ORDINAL
@Initializer(after=EXTENSIONS_AUGMENTED) public static void initThreadPool()
public void onStarted(hudson.model.Run build, hudson.model.TaskListener listener)
onStarted
in class hudson.model.listeners.RunListener<hudson.model.Run>
public void onCompleted(hudson.model.Run run, @Nonnull hudson.model.TaskListener listener)
onCompleted
in class hudson.model.listeners.RunListener<hudson.model.Run>
public void onFinalized(hudson.model.Run run)
onFinalized
in class hudson.model.listeners.RunListener<hudson.model.Run>
public static void scanIfNotScanned(hudson.model.Run build, PrintStream scanLog)
StatisticsLogger
.build
- the build to scanscanLog
- log to write information topublic static void scan(hudson.model.Run build, PrintStream scanLog)
FailureCauseBuildAction
and reports to the
StatisticsLogger
.build
- the build to scanscanLog
- log to write information to.public static String createSlackMessage(List<FoundFailureCause> foundCauseList, boolean notifySlackOfAllFailures, List<String> slackFailureCauseCategories, String buildName, String buildNum, String buildUrl, PrintStream scanLog)
foundCauseList
- - Build failure causes found in the buildnotifySlackOfAllFailures
- - Flag to indicate if all failures should be sent to SlackslackFailureCauseCategories
- - Failure causes for which to notify Slack (from BFA configuration)buildName
- - Name of the buildbuildNum
- - Build objectbuildUrl
- - Full URL of buildscanLog
- - PrintStream for the build logCopyright © 2016–2020. All rights reserved.