Add config error for Swift build failures

This commit is contained in:
Henry Mercer
2024-03-15 12:17:49 +00:00
parent bddfc7c6d5
commit e28ae3a84c
3 changed files with 17 additions and 3 deletions
+7 -1
View File
@@ -127,6 +127,7 @@ var CliConfigErrorCategory;
CliConfigErrorCategory["NoSourceCodeSeen"] = "NoSourceCodeSeen"; CliConfigErrorCategory["NoSourceCodeSeen"] = "NoSourceCodeSeen";
CliConfigErrorCategory["NoSupportedBuildCommandSucceeded"] = "NoSupportedBuildCommandSucceeded"; CliConfigErrorCategory["NoSupportedBuildCommandSucceeded"] = "NoSupportedBuildCommandSucceeded";
CliConfigErrorCategory["NoSupportedBuildSystemDetected"] = "NoSupportedBuildSystemDetected"; CliConfigErrorCategory["NoSupportedBuildSystemDetected"] = "NoSupportedBuildSystemDetected";
CliConfigErrorCategory["SwiftBuildFailed"] = "SwiftBuildFailed";
})(CliConfigErrorCategory || (exports.CliConfigErrorCategory = CliConfigErrorCategory = {})); })(CliConfigErrorCategory || (exports.CliConfigErrorCategory = CliConfigErrorCategory = {}));
/** /**
* All of our caught CLI error messages that we handle specially: ie. if we * All of our caught CLI error messages that we handle specially: ie. if we
@@ -156,7 +157,7 @@ exports.cliErrorsConfig = {
}, },
[CliConfigErrorCategory.MavenBuildFailed]: { [CliConfigErrorCategory.MavenBuildFailed]: {
cliErrorMessageCandidates: [ cliErrorMessageCandidates: [
new RegExp("[autobuild] [ERROR] Failed to execute goal"), new RegExp("\\[autobuild\\] \\[ERROR\\] Failed to execute goal"),
], ],
}, },
[CliConfigErrorCategory.NoBuildCommandAutodetected]: { [CliConfigErrorCategory.NoBuildCommandAutodetected]: {
@@ -197,6 +198,11 @@ exports.cliErrorsConfig = {
new RegExp("No supported build system detected"), new RegExp("No supported build system detected"),
], ],
}, },
[CliConfigErrorCategory.SwiftBuildFailed]: {
cliErrorMessageCandidates: [
new RegExp("\\[autobuilder/build\\] \\[build-command-failed\\] `autobuild` failed to run the build command"),
],
},
}; };
/** /**
* Check if the given CLI error or exit code, if applicable, apply to any known * Check if the given CLI error or exit code, if applicable, apply to any known
File diff suppressed because one or more lines are too long
+9 -1
View File
@@ -134,6 +134,7 @@ export enum CliConfigErrorCategory {
NoSourceCodeSeen = "NoSourceCodeSeen", NoSourceCodeSeen = "NoSourceCodeSeen",
NoSupportedBuildCommandSucceeded = "NoSupportedBuildCommandSucceeded", NoSupportedBuildCommandSucceeded = "NoSupportedBuildCommandSucceeded",
NoSupportedBuildSystemDetected = "NoSupportedBuildSystemDetected", NoSupportedBuildSystemDetected = "NoSupportedBuildSystemDetected",
SwiftBuildFailed = "SwiftBuildFailed",
} }
type CliErrorConfiguration = { type CliErrorConfiguration = {
@@ -176,7 +177,7 @@ export const cliErrorsConfig: Record<
}, },
[CliConfigErrorCategory.MavenBuildFailed]: { [CliConfigErrorCategory.MavenBuildFailed]: {
cliErrorMessageCandidates: [ cliErrorMessageCandidates: [
new RegExp("[autobuild] [ERROR] Failed to execute goal"), new RegExp("\\[autobuild\\] \\[ERROR\\] Failed to execute goal"),
], ],
}, },
[CliConfigErrorCategory.NoBuildCommandAutodetected]: { [CliConfigErrorCategory.NoBuildCommandAutodetected]: {
@@ -224,6 +225,13 @@ export const cliErrorsConfig: Record<
new RegExp("No supported build system detected"), new RegExp("No supported build system detected"),
], ],
}, },
[CliConfigErrorCategory.SwiftBuildFailed]: {
cliErrorMessageCandidates: [
new RegExp(
"\\[autobuilder/build\\] \\[build-command-failed\\] `autobuild` failed to run the build command",
),
],
},
}; };
/** /**