[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",
|
||||
"conclusion": "unknown_conclusion",
|
||||
"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 */
|
||||
const { REPOSITORY, RUN_ID, GITHUB_TOKEN, TEST_MODE } = process.env;
|
||||
const IGNORED_JOBS = [
|
||||
'Evaluate Project Job Statuses',
|
||||
'Report tests results',
|
||||
/Evaluate Project Job Statuses/,
|
||||
/Report results on Slack/,
|
||||
/Publish reports/,
|
||||
];
|
||||
|
||||
const isJobRequired = ( job ) => {
|
||||
return (
|
||||
! job.name.endsWith( '(optional)' ) &&
|
||||
! IGNORED_JOBS.includes( job.name )
|
||||
! IGNORED_JOBS.some( ( ignoredJobRegex ) =>
|
||||
ignoredJobRegex.test( job.name )
|
||||
)
|
||||
);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue