[ci] Evaluate jobs: update the ignore list with regex expressions (#48268)

This commit is contained in:
Adrian Moldovan 2024-06-07 19:34:55 +03:00 committed by GitHub
parent 31e8b6cc6b
commit f0478c3f60
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 26 additions and 3 deletions

View File

@ -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"
} }
] ]

View File

@ -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 )
)
); );
}; };