debian-mirror-gitlab/.gitlab/ci/review.gitlab-ci.yml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

77 lines
2.2 KiB
YAML
Raw Normal View History

2022-06-21 17:19:12 +05:30
include:
- remote: 'https://gitlab.com/gitlab-org/modelops/applied-ml/review-recommender/ci-templates/-/raw/v0.2.1/recommender/Reviewers.gitlab-ci.yml'
2020-05-24 23:13:21 +05:30
review-cleanup:
2019-12-21 20:55:43 +05:30
extends:
- .default-retry
2020-03-13 15:44:24 +05:30
- .review:rules:review-cleanup
2022-01-26 12:08:38 +05:30
image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:gitlab-helm3-kubectl1.14
2019-12-21 20:55:43 +05:30
stage: prepare
environment:
2022-01-26 12:08:38 +05:30
name: review/${CI_COMMIT_REF_SLUG}${FREQUENCY}
2019-12-21 20:55:43 +05:30
action: stop
before_script:
- source scripts/utils.sh
2022-01-26 12:08:38 +05:30
- source scripts/review_apps/review-apps.sh
2020-05-24 23:13:21 +05:30
- source scripts/review_apps/gcp_cleanup.sh
2019-12-21 20:55:43 +05:30
- install_gitlab_gem
2020-05-24 23:13:21 +05:30
- setup_gcp_dependencies
2019-12-21 20:55:43 +05:30
script:
2022-01-26 12:08:38 +05:30
- delete_release
- delete_namespace
2019-12-21 20:55:43 +05:30
- ruby -rrubygems scripts/review_apps/automated_cleanup.rb
2020-04-22 19:07:51 +05:30
- gcp_cleanup
2021-11-18 22:05:49 +05:30
start-review-app-pipeline:
2020-07-28 23:09:34 +05:30
extends:
2022-01-26 12:08:38 +05:30
- .review:rules:start-review-app-pipeline
2021-11-18 22:05:49 +05:30
stage: review
2020-07-28 23:09:34 +05:30
needs:
2021-11-18 22:05:49 +05:30
- job: build-assets-image
2020-07-28 23:09:34 +05:30
artifacts: false
2021-11-18 22:05:49 +05:30
- job: build-qa-image
artifacts: false
# These variables are set in the pipeline schedules.
# 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
2021-10-27 15:23:28 +05:30
variables:
2021-11-18 22:05:49 +05:30
FREQUENCY: $FREQUENCY
DAST_RUN: $DAST_RUN
trigger:
include:
- local: .gitlab/ci/review-apps/main.gitlab-ci.yml
strategy: depend
2021-09-04 01:27:46 +05:30
2019-07-31 22:56:46 +05:30
danger-review:
2019-12-04 20:38:33 +05:30
extends:
- .default-retry
2021-04-17 20:07:23 +05:30
- .danger-review-cache
2020-03-13 15:44:24 +05:30
- .review:rules:danger
2019-07-31 22:56:46 +05:30
stage: test
2020-04-08 14:13:33 +05:30
needs: []
2021-04-17 20:07:23 +05:30
before_script:
2021-06-08 01:23:25 +05:30
- source scripts/utils.sh
- bundle_install_script "--with danger"
2021-01-03 14:25:43 +05:30
- run_timed_command "retry yarn install --frozen-lockfile"
2021-04-17 20:07:23 +05:30
script:
2021-04-29 21:17:54 +05:30
- >
if [ -z "$DANGER_GITLAB_API_TOKEN" ]; then
2021-09-30 23:02:18 +05:30
run_timed_command danger_as_local
2021-04-29 21:17:54 +05:30
else
2022-06-21 17:19:12 +05:30
danger_id=$(echo -n ${DANGER_GITLAB_API_TOKEN} | md5sum | awk '{print $1}' | cut -c5-10)
run_timed_command "bundle exec danger --fail-on-errors=true --verbose --danger_id=${danger_id}"
2021-04-29 21:17:54 +05:30
fi
2021-09-30 23:02:18 +05:30
danger-review-local:
extends:
- danger-review
- .review:rules:danger-local
script:
- run_timed_command danger_as_local
2022-06-21 17:19:12 +05:30
reviewers-recommender:
extends:
- .default-retry
stage: test
needs: []