@Extension(ordinal=11003.0) public class BuildFailureScanner extends RunListener<Run>
ExtensionPoint.LegacyInstancesAreScopedToHudson
Modifier and Type | Field and Description |
---|---|
static int |
ORDINAL
The ordinal of this extension, one thousand below the GerritTrigger plugin.
|
LISTENERS, targetType
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(Run run,
TaskListener listener) |
void |
onStarted(Run build,
TaskListener listener) |
static void |
scan(Run build,
PrintStream scanLog)
Performs a scan of the build, adds the
FailureCauseBuildAction and reports to the
StatisticsLogger . |
static void |
scanIfNotScanned(Run build,
PrintStream scanLog)
Scans the build if it should be scanned and it has not already been scanned.
|
all, fireCompleted, fireDeleted, fireFinalized, fireInitialize, fireStarted, onDeleted, onFinalized, onInitialize, register, setUpEnvironment, unregister
public static final int ORDINAL
@Initializer(after=EXTENSIONS_AUGMENTED) public static void initThreadPool()
public void onStarted(Run build, TaskListener listener)
onStarted
in class RunListener<Run>
public void onCompleted(Run run, @Nonnull TaskListener listener)
onCompleted
in class RunListener<Run>
public static void scanIfNotScanned(Run build, PrintStream scanLog)
StatisticsLogger
.build
- the build to scanscanLog
- log to write information topublic static void scan(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–2021. All rights reserved.