Skip to content

Commit 8d64553

Browse files
authored
ncu-ci: parse console text of the first failed phase (#351)
Previously we try to detect the type of the failed phase and return a generic build failure when the job failed in a non-test phase. This is not really necessary - the console text parser is capable of detecting the actual build failure from even the console text of the build phase. Also hard-coding the test phase name makes the detection fragile when there are configuration changes in the Jenkins. So we should just skip the detection.
1 parent 286a61e commit 8d64553

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

lib/ci/ci_result_parser.js

-13
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ const FAILURE = 'FAILURE';
3737
const ABORTED = 'ABORTED';
3838
const UNSTABLE = 'UNSTABLE';
3939

40-
const TEST_PHASE = 'Binary Tests';
4140
// com.tikal.jenkins.plugins.multijob.MultiJobBuild
4241
const BUILD_FIELDS = 'builtOn,buildNumber,jobName,result,url';
4342
const ACTION_TREE = 'actions[parameters[name,value]]';
@@ -735,18 +734,6 @@ class FannedBuild extends Job {
735734
return this.parseConsoleText();
736735
}
737736

738-
if (failedPhase.phaseName !== TEST_PHASE &&
739-
!failedPhase.phaseName.toLowerCase().includes('compilation')) {
740-
this.failures = [
741-
new BuildFailure(
742-
{ url: failedPhase.url },
743-
`Failed in ${failedPhase.phaseName} phase (${failedPhase.jobName})`
744-
// TODO: parse console text for the failed phase
745-
)
746-
];
747-
return this.failures;
748-
}
749-
750737
const { jobName, buildNumber } = failedPhase;
751738
const build = new NormalBuild(cli, request, jobName, buildNumber);
752739
let failures = await build.getResults();

0 commit comments

Comments
 (0)