diff options
Diffstat (limited to '.gitlab/ci/review.gitlab-ci.yml')
-rw-r--r-- | .gitlab/ci/review.gitlab-ci.yml | 45 |
1 files changed, 40 insertions, 5 deletions
diff --git a/.gitlab/ci/review.gitlab-ci.yml b/.gitlab/ci/review.gitlab-ci.yml index 35df4de6513..b6c273aeb99 100644 --- a/.gitlab/ci/review.gitlab-ci.yml +++ b/.gitlab/ci/review.gitlab-ci.yml @@ -6,15 +6,48 @@ review-cleanup: stage: prepare environment: name: review/regular-cleanup - action: stop + action: access before_script: - source scripts/utils.sh - - source scripts/review_apps/gcp_cleanup.sh + - !reference [".use-kube-context", before_script] - install_gitlab_gem - - setup_gcp_dependencies + - setup_gcloud script: - - scripts/review_apps/automated_cleanup.rb - - gcp_cleanup + - scripts/review_apps/automated_cleanup.rb || (scripts/slack review-apps-monitoring "☠️ \`${CI_JOB_NAME}\` failed! ☠️ See ${CI_JOB_URL} - <https://gitlab.com/gitlab-org/quality/engineering-productivity/team/-/blob/main/runbooks/review-apps.md#review-cleanup-job-failed|📗 RUNBOOK 📕>" warning "GitLab Bot" && exit 1); + +.base-review-checks: + extends: + - .default-retry + image: ${REVIEW_APPS_IMAGE} + stage: prepare + before_script: + - source scripts/utils.sh + - setup_gcloud + - !reference [".use-kube-context", before_script] + +review-k8s-resources-count-checks: + extends: + - .base-review-checks + - .review:rules:review-k8s-resources-count-checks + needs: + - job: review-cleanup + optional: true + environment: + name: review/k8s-resources-count-checks + action: verify + script: + - scripts/review_apps/k8s-resources-count-checks.sh || (scripts/slack review-apps-monitoring "☠️ \`${CI_JOB_NAME}\` failed! ☠️ See ${CI_JOB_URL} - <https://gitlab.com/gitlab-org/quality/engineering-productivity/team/-/blob/main/runbooks/review-apps.md#review-k8s-resources-count-checks-job-failed|📗 RUNBOOK 📕>" warning "GitLab Bot" && exit 1); + +review-gcp-quotas-checks: + extends: + - .base-review-checks + - .review:rules:review-gcp-quotas-checks + needs: [] + environment: + name: review/gcp-quotas-checks + action: verify + script: + - ruby scripts/review_apps/gcp-quotas-checks.rb || (scripts/slack review-apps-monitoring "☠️ \`${CI_JOB_NAME}\` failed! ☠️ See ${CI_JOB_URL} - <https://gitlab.com/gitlab-org/quality/engineering-productivity/team/-/blob/main/runbooks/review-apps.md#review-gcp-quotas-checks-job-failed|📗 RUNBOOK 📕>" warning "GitLab Bot" && exit 1); start-review-app-pipeline: extends: @@ -29,6 +62,8 @@ start-review-app-pipeline: # They need to be explicitly passed on to the child pipeline. # https://docs.gitlab.com/ee/ci/pipelines/multi_project_pipelines.html#pass-cicd-variables-to-a-downstream-pipeline-by-using-the-variables-keyword variables: + # This is needed by `review-build-cng-env` (`.gitlab/ci/review-apps/main.gitlab-ci.yml`). + PARENT_PIPELINE_ID: $CI_PIPELINE_ID SCHEDULE_TYPE: $SCHEDULE_TYPE DAST_RUN: $DAST_RUN SKIP_MESSAGE: Skipping review-app due to mr containing only quarantine changes! |