feat(ci): add retry job functionality to dynamic pipeline report

Introduced changes:

- add a manual ci job to retry failed jobs.
- refactor js scripts in report template
- extract the CI ENV vars related to the report generation script to the predefined constants.py module
- introduce a new action "retry_failed_jobs" in helper script "gitlab_api.py"
This commit is contained in:
Aleksei Apaseev
2024-07-02 17:38:41 +08:00
parent f08926be0e
commit a6b84b5ccc
13 changed files with 512 additions and 307 deletions

View File

@@ -12,6 +12,7 @@ stages:
- test_deploy
- deploy
- post_deploy
- retry_failed_jobs
variables:
# System environment

View File

@@ -0,0 +1,14 @@
retry_failed_jobs:
stage: retry_failed_jobs
tags: [shiny, fast_run]
image: $ESP_ENV_IMAGE
dependencies: null
before_script: []
cache: []
extends: []
script:
- echo "Retrieving and retrying all failed jobs for the pipeline..."
- python tools/ci/python_packages/gitlab_api.py retry_failed_jobs $CI_MERGE_REQUEST_PROJECT_ID --pipeline_id $CI_PIPELINE_ID
when: manual
needs:
- generate_failed_jobs_report