[ci] Evaluate jobs: update the ignore list with regex expressions (#48268)
This commit is contained in:
parent
31e8b6cc6b
commit
f0478c3f60
|
@ -78,5 +78,25 @@
|
||||||
"status": "completed",
|
"status": "completed",
|
||||||
"conclusion": "unknown_conclusion",
|
"conclusion": "unknown_conclusion",
|
||||||
"name": "Job with unknown conclusion (optional)"
|
"name": "Job with unknown conclusion (optional)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"status": "in_progress",
|
||||||
|
"conclusion": "",
|
||||||
|
"name": "Publish reports in_progress"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"status": "completed",
|
||||||
|
"conclusion": "",
|
||||||
|
"name": "Publish reports - failed"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"status": "completed",
|
||||||
|
"conclusion": "",
|
||||||
|
"name": "Another Publish reports that failed"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"status": "queued",
|
||||||
|
"conclusion": "",
|
||||||
|
"name": "Publish reports job queued"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,14 +1,17 @@
|
||||||
/* eslint-disable no-console */
|
/* eslint-disable no-console */
|
||||||
const { REPOSITORY, RUN_ID, GITHUB_TOKEN, TEST_MODE } = process.env;
|
const { REPOSITORY, RUN_ID, GITHUB_TOKEN, TEST_MODE } = process.env;
|
||||||
const IGNORED_JOBS = [
|
const IGNORED_JOBS = [
|
||||||
'Evaluate Project Job Statuses',
|
/Evaluate Project Job Statuses/,
|
||||||
'Report tests results',
|
/Report results on Slack/,
|
||||||
|
/Publish reports/,
|
||||||
];
|
];
|
||||||
|
|
||||||
const isJobRequired = ( job ) => {
|
const isJobRequired = ( job ) => {
|
||||||
return (
|
return (
|
||||||
! job.name.endsWith( '(optional)' ) &&
|
! job.name.endsWith( '(optional)' ) &&
|
||||||
! IGNORED_JOBS.includes( job.name )
|
! IGNORED_JOBS.some( ( ignoredJobRegex ) =>
|
||||||
|
ignoredJobRegex.test( job.name )
|
||||||
|
)
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue