@node-core/utils 7.2.2 → 7.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/ci/run_ci.js +14 -4
- package/package.json +1 -1
package/lib/ci/run_ci.js
CHANGED
|
@@ -94,10 +94,20 @@ export class RunPRJob {
|
|
|
94
94
|
if (checkForDuplicates) {
|
|
95
95
|
await this.prData.getComments();
|
|
96
96
|
const { jobid, link } = new JobParser(this.prData.comments).parse().get('PR') ?? {};
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
97
|
+
let actions;
|
|
98
|
+
try {
|
|
99
|
+
({ actions } = jobid
|
|
100
|
+
? (await new PRBuild(cli, request, jobid, undefined, 'actions[parameters[name,value]]')
|
|
101
|
+
.getBuildData())
|
|
102
|
+
: {});
|
|
103
|
+
} catch (err) {
|
|
104
|
+
// Jenkins may no longer have the build (e.g. the record was lost) or
|
|
105
|
+
// may answer with an HTML error page instead of JSON. Do not let that
|
|
106
|
+
// block starting a new CI run.
|
|
107
|
+
cli.stopSpinner(`Could not query existing CI run ${link}: ${err.message}`,
|
|
108
|
+
cli.SPINNER_STATUS.WARN);
|
|
109
|
+
cli.warn('Skipping the duplicate CI check');
|
|
110
|
+
}
|
|
101
111
|
const { parameters } = actions?.find(a => 'parameters' in a) ?? {};
|
|
102
112
|
if (parameters?.find(c => c.name === 'COMMIT_SHA_CHECK')?.value === certifySafe) {
|
|
103
113
|
cli.info('Existing CI run found: ' + link);
|