diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-06 18:08:52 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-06 18:08:52 +0300 |
commit | 7b69a22d499787378aa30561822ef797a99c22e5 (patch) | |
tree | 630c757f4b55abd7ee445def6577587ec57e860d /.gitlab | |
parent | d75e21489f113731bfe02b6c88e58879b5859103 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to '.gitlab')
-rw-r--r-- | .gitlab/ci/docs.gitlab-ci.yml | 10 | ||||
-rw-r--r-- | .gitlab/ci/review-apps/main.gitlab-ci.yml | 26 | ||||
-rw-r--r-- | .gitlab/ci/review.gitlab-ci.yml | 18 | ||||
-rw-r--r-- | .gitlab/ci/rules.gitlab-ci.yml | 25 |
4 files changed, 67 insertions, 12 deletions
diff --git a/.gitlab/ci/docs.gitlab-ci.yml b/.gitlab/ci/docs.gitlab-ci.yml index d47650e0f83..f7783cc1d33 100644 --- a/.gitlab/ci/docs.gitlab-ci.yml +++ b/.gitlab/ci/docs.gitlab-ci.yml @@ -70,6 +70,16 @@ docs-lint markdown: script: - scripts/lint-doc.sh +docs-lint blueprint: + extends: + - .default-retry + - .docs:rules:docs-blueprints-lint + image: ${GITLAB_DEPENDENCY_PROXY_ADDRESS}ruby:${RUBY_VERSION}-slim + stage: lint + needs: [] + script: + - scripts/lint-docs-blueprints.rb + docs code_quality: extends: - .reports:rules:code_quality diff --git a/.gitlab/ci/review-apps/main.gitlab-ci.yml b/.gitlab/ci/review-apps/main.gitlab-ci.yml index a9ebf3b1120..2b22d96fc2d 100644 --- a/.gitlab/ci/review-apps/main.gitlab-ci.yml +++ b/.gitlab/ci/review-apps/main.gitlab-ci.yml @@ -100,7 +100,7 @@ review-build-cng: environment: name: review/${CI_COMMIT_REF_SLUG}${SCHEDULE_TYPE} # No separator for SCHEDULE_TYPE so it's compatible as before and looks nice without it url: https://gitlab-${CI_ENVIRONMENT_SLUG}.${REVIEW_APPS_DOMAIN} - on_stop: review-stop + on_stop: trigger-review-stop review-deploy: extends: @@ -173,12 +173,6 @@ review-deploy-sample-projects: # because some repos are private and CI_JOB_TOKEN cannot access files. # See https://gitlab.com/gitlab-org/gitlab/issues/191273 GIT_DEPTH: 1 - before_script: - - source ./scripts/utils.sh - - source ./scripts/review_apps/review-apps.sh - - !reference [".use-kube-context", before_script] - script: - - retry delete_helm_release review-delete-deployment: extends: @@ -186,11 +180,23 @@ review-delete-deployment: - .review:rules:review-delete-deployment dependencies: [] stage: prepare + before_script: + - source ./scripts/utils.sh + - source ./scripts/review_apps/review-apps.sh + - !reference [".use-kube-context", before_script] + script: + - retry delete_helm_release -review-stop: +trigger-review-stop: extends: - .review-stop-base - - .review:rules:review-stop - resource_group: review/${CI_COMMIT_REF_SLUG}${SCHEDULE_TYPE} # CI_ENVIRONMENT_SLUG is not available here and we want this to be the same as the environment + - .review:rules:trigger-review-stop stage: deploy needs: [] + before_script: + - source ./scripts/utils.sh + - install_gitlab_gem + script: + - review_stop_job_id="$(scripts/api/get_job_id.rb --pipeline-id "${PARENT_PIPELINE_ID}" --job-name "review-stop")" + - | + curl --request POST --header "Private-Token: ${PROJECT_TOKEN_FOR_CI_SCRIPTS_API_USAGE}" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/jobs/${review_stop_job_id}/play" diff --git a/.gitlab/ci/review.gitlab-ci.yml b/.gitlab/ci/review.gitlab-ci.yml index 20e4dec7dbf..f0e87e0161a 100644 --- a/.gitlab/ci/review.gitlab-ci.yml +++ b/.gitlab/ci/review.gitlab-ci.yml @@ -4,9 +4,12 @@ review-cleanup: - .review:rules:review-cleanup image: ${REVIEW_APPS_IMAGE} stage: prepare + needs: [] environment: name: review/regular-cleanup action: access + variables: + GIT_DEPTH: 1 before_script: - source scripts/utils.sh - !reference [".use-kube-context", before_script] @@ -15,6 +18,21 @@ review-cleanup: script: - 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); +review-stop: + extends: + - review-cleanup + - .review:rules:review-stop + environment: + name: review/${CI_COMMIT_REF_SLUG}${SCHEDULE_TYPE} # No separator for SCHEDULE_TYPE so it's compatible as before and looks nice without it + action: stop + resource_group: review/${CI_COMMIT_REF_SLUG}${SCHEDULE_TYPE} # CI_ENVIRONMENT_SLUG is not available here and we want this to be the same as the environment + before_script: + - source ./scripts/utils.sh + - source ./scripts/review_apps/review-apps.sh + - !reference [".use-kube-context", before_script] + script: + - retry delete_helm_release + .base-review-checks: extends: - .default-retry diff --git a/.gitlab/ci/rules.gitlab-ci.yml b/.gitlab/ci/rules.gitlab-ci.yml index ebc8cd49968..ced63024fc3 100644 --- a/.gitlab/ci/rules.gitlab-ci.yml +++ b/.gitlab/ci/rules.gitlab-ci.yml @@ -228,6 +228,11 @@ - "scripts/lint-doc.sh" - ".gitlab/ci/docs.gitlab-ci.yml" +.docs-blueprints-patterns: &docs-blueprints-patterns + - "doc/architecture/blueprints/**/*" + - "scripts/lint-docs-blueprints.rb" + - ".gitlab/ci/docs.gitlab-ci.yml" + .docs-deprecations-and-removals-patterns: &docs-deprecations-and-removals-patterns - "doc/update/deprecations.md" - "doc/update/removals.md" @@ -851,6 +856,11 @@ - <<: *if-default-refs changes: *docs-patterns +.docs:rules:docs-blueprints-lint: + rules: + - <<: *if-default-refs + changes: *docs-blueprints-patterns + .docs:rules:deprecations-and-removals: rules: - <<: *if-default-refs @@ -2060,7 +2070,7 @@ # The following rules needs to be the same as the one for .review:rules:start-review-app-pipeline # except that: # - all rules have `when: manual` and `allow_failure: true` here -.review:rules:review-cleanup: +.review:rules:review-stop-merge-requests: rules: - <<: *if-not-ee when: never @@ -2097,9 +2107,20 @@ changes: *code-patterns when: manual allow_failure: true + +.review:rules:review-cleanup: + rules: + - !reference [".review:rules:review-stop-merge-requests", rules] - <<: *if-dot-com-ee-schedule-default-branch-maintenance allow_failure: true +.review:rules:review-stop: + rules: + - !reference [".review:rules:review-stop-merge-requests", rules] + - <<: *if-dot-com-gitlab-org-schedule + when: manual + allow_failure: true + .review:rules:review-k8s-resources-count-checks: rules: - <<: *if-dot-com-ee-schedule-default-branch-maintenance @@ -2118,7 +2139,7 @@ - "scripts/review_apps/gcp-quotas-checks.rb" allow_failure: true -.review:rules:review-stop: +.review:rules:trigger-review-stop: rules: - when: manual allow_failure: true |