summaryrefslogtreecommitdiff
path: root/.gitlab
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-20 00:09:29 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-20 00:09:29 +0000
commitb060b8b7e4e895e28226b366b92081512225cd14 (patch)
tree0364ce1045b2e0a1cc3cad7b0d487e254335b66c /.gitlab
parent49a923c646a2c24b5377cfde8236c73094c60d42 (diff)
downloadgitlab-ce-b060b8b7e4e895e28226b366b92081512225cd14.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to '.gitlab')
-rw-r--r--.gitlab/ci/dev-fixtures.gitlab-ci.yml2
-rw-r--r--.gitlab/ci/reports.gitlab-ci.yml6
-rw-r--r--.gitlab/ci/review.gitlab-ci.yml33
-rw-r--r--.gitlab/ci/rules.gitlab-ci.yml77
4 files changed, 80 insertions, 38 deletions
diff --git a/.gitlab/ci/dev-fixtures.gitlab-ci.yml b/.gitlab/ci/dev-fixtures.gitlab-ci.yml
index e77a75d2822..0045691873f 100644
--- a/.gitlab/ci/dev-fixtures.gitlab-ci.yml
+++ b/.gitlab/ci/dev-fixtures.gitlab-ci.yml
@@ -11,7 +11,7 @@
SEED_CYCLE_ANALYTICS: "true"
SEED_PRODUCTIVITY_ANALYTICS: "true"
CYCLE_ANALYTICS_ISSUE_COUNT: 1
- SIZE: 0 # number of external projects to fork, requires network connection
+ SIZE: 0 # number of external projects to fork, requires network connection
# SEED_NESTED_GROUPS: "false" # requires network connection
run-dev-fixtures:
diff --git a/.gitlab/ci/reports.gitlab-ci.yml b/.gitlab/ci/reports.gitlab-ci.yml
index f381c423f5d..77ad938a0ef 100644
--- a/.gitlab/ci/reports.gitlab-ci.yml
+++ b/.gitlab/ci/reports.gitlab-ci.yml
@@ -157,9 +157,9 @@ dast:
extends:
- .default-retry
- .reports:rules:dast
- needs:
- - job: review-deploy
- artifacts: true
+ # This is needed so that manual jobs with needs don't block the pipeline.
+ # See https://gitlab.com/gitlab-org/gitlab/-/issues/199979.
+ dependencies: ["review-deploy"]
stage: qa # GitLab-specific
image:
name: "registry.gitlab.com/gitlab-org/security-products/dast:$DAST_VERSION"
diff --git a/.gitlab/ci/review.gitlab-ci.yml b/.gitlab/ci/review.gitlab-ci.yml
index 14b1561ec1a..17a8bbbb21d 100644
--- a/.gitlab/ci/review.gitlab-ci.yml
+++ b/.gitlab/ci/review.gitlab-ci.yml
@@ -15,7 +15,7 @@
build-qa-image:
extends:
- .review-docker
- - .review:rules:mr-and-schedule
+ - .review:rules:mr-and-schedule-auto
stage: prepare
script:
- '[[ ! -d "ee/" ]] || export GITLAB_EDITION="ee"'
@@ -45,7 +45,7 @@ review-cleanup:
review-build-cng:
extends:
- .default-retry
- - .review:rules:mr-and-schedule
+ - .review:rules:mr-and-schedule-auto-if-frontend-manual-otherwise
image: ruby:2.6-alpine
stage: review-prepare
before_script:
@@ -57,6 +57,9 @@ review-build-cng:
artifacts: false
script:
- BUILD_TRIGGER_TOKEN=$REVIEW_APPS_BUILD_TRIGGER_TOKEN ./scripts/trigger-build cng
+ # When the job is manual, review-deploy is also manual and we don't want people
+ # to have to manually start the jobs in sequence, so we do it for them.
+ - '[ -z $CI_JOB_MANUAL ] || play_job "review-deploy"'
.review-workflow-base:
extends:
@@ -76,11 +79,9 @@ review-build-cng:
review-deploy:
extends:
- .review-workflow-base
- - .review:rules:mr-and-schedule
+ - .review:rules:mr-and-schedule-auto-if-frontend-manual-otherwise
stage: review
- needs:
- - job: review-build-cng
- artifacts: false
+ dependencies: []
resource_group: "review/${CI_COMMIT_REF_NAME}"
allow_failure: true
before_script:
@@ -100,6 +101,10 @@ review-deploy:
- download_chart
- date
- deploy || (display_deployment_debug && exit 1)
+ # When the job is manual, review-qa-smoke is also manual and we don't want people
+ # to have to manually start the jobs in sequence, so we do it for them.
+ - '[ -z $CI_JOB_MANUAL ] || play_job "review-qa-smoke"'
+ - '[ -z $CI_JOB_MANUAL ] || play_job "review-performance"'
artifacts:
paths: [environment_url.txt]
expire_in: 2 days
@@ -140,9 +145,9 @@ review-stop:
.review-qa-base:
extends: .review-docker
stage: qa
- needs:
- - job: review-deploy
- artifacts: true
+ # This is needed so that manual jobs with needs don't block the pipeline.
+ # See https://gitlab.com/gitlab-org/gitlab/-/issues/199979.
+ dependencies: ["review-deploy"]
allow_failure: true
variables:
QA_ARTIFACTS_DIR: "${CI_PROJECT_DIR}/qa"
@@ -172,7 +177,7 @@ review-stop:
review-qa-smoke:
extends:
- .review-qa-base
- - .review:rules:mr-only-auto
+ - .review:rules:mr-only-auto-if-frontend-manual-otherwise
script:
- gitlab-qa Test::Instance::Smoke "${QA_IMAGE}" "${CI_ENVIRONMENT_URL}"
@@ -189,11 +194,11 @@ review-qa-all:
review-performance:
extends:
- .review-docker
- - .review:rules:mr-and-schedule
+ - .review:rules:mr-and-schedule-auto-if-frontend-manual-otherwise
stage: qa
- needs:
- - job: review-deploy
- artifacts: true
+ # This is needed so that manual jobs with needs don't block the pipeline.
+ # See https://gitlab.com/gitlab-org/gitlab/-/issues/199979.
+ dependencies: ["review-deploy"]
allow_failure: true
before_script:
- export CI_ENVIRONMENT_URL="$(cat environment_url.txt)"
diff --git a/.gitlab/ci/rules.gitlab-ci.yml b/.gitlab/ci/rules.gitlab-ci.yml
index 26138532f46..aae6f5a1e8e 100644
--- a/.gitlab/ci/rules.gitlab-ci.yml
+++ b/.gitlab/ci/rules.gitlab-ci.yml
@@ -57,6 +57,17 @@
- "doc/**/*"
- ".markdownlint.json"
+.frontend-dependency-patterns: &frontend-dependency-patterns
+ - "{package.json,yarn.lock}"
+
+.frontend-patterns: &frontend-patterns
+ - "{package.json,yarn.lock}"
+ - "{babel.config,jest.config}.js"
+ - ".csscomb.json"
+ - "Dockerfile.assets"
+ - "vendor/assets/**/*"
+ - "{,ee/}{app/assets,app/helpers,app/presenters,app/views,locale,public,symbol}/**/*"
+
.backstage-patterns: &backstage-patterns
- "Dangerfile"
- "danger/**/*"
@@ -66,39 +77,38 @@
- "doc/README.md" # Some RSpec test rely on this file
.code-patterns: &code-patterns
+ - "{package.json,yarn.lock}"
+ - "{babel.config,jest.config}.js"
+ - ".csscomb.json"
+ - "Dockerfile.assets"
+ - "vendor/assets/**/*"
- ".gitlab/ci/**/*"
- ".{eslintignore,gitattributes,nvmrc,prettierrc,stylelintrc,yamllint}"
- ".{codeclimate,eslintrc,gitlab-ci,haml-lint,haml-lint_todo,rubocop,rubocop_todo,scss-lint}.yml"
- - ".csscomb.json"
- - "Dockerfile.assets"
- "*_VERSION"
- "Gemfile{,.lock}"
- "Rakefile"
- - "{babel.config,jest.config}.js"
- "config.ru"
- - "{package.json,yarn.lock}"
- "{,ee/}{app,bin,config,db,haml_lint,lib,locale,public,scripts,symbol,vendor}/**/*"
- "doc/api/graphql/reference/*" # Files in this folder are auto-generated
-.frontend-dependency-patterns: &frontend-dependency-patterns
- - "{package.json,yarn.lock}"
-
.qa-patterns: &qa-patterns
- ".dockerignore"
- "qa/**/*"
.code-backstage-patterns: &code-backstage-patterns
+ - "{package.json,yarn.lock}"
+ - "{babel.config,jest.config}.js"
+ - ".csscomb.json"
+ - "Dockerfile.assets"
+ - "vendor/assets/**/*"
- ".gitlab/ci/**/*"
- ".{eslintignore,gitattributes,nvmrc,prettierrc,stylelintrc,yamllint}"
- ".{codeclimate,eslintrc,gitlab-ci,haml-lint,haml-lint_todo,rubocop,rubocop_todo,scss-lint}.yml"
- - ".csscomb.json"
- - "Dockerfile.assets"
- "*_VERSION"
- "Gemfile{,.lock}"
- "Rakefile"
- - "{babel.config,jest.config}.js"
- "config.ru"
- - "{package.json,yarn.lock}"
- "{,ee/}{app,bin,config,db,haml_lint,lib,locale,public,scripts,symbol,vendor}/**/*"
- "doc/api/graphql/reference/*" # Files in this folder are auto-generated
# Backstage changes
@@ -110,17 +120,18 @@
- "doc/README.md" # Some RSpec test rely on this file
.code-qa-patterns: &code-qa-patterns
+ - "{package.json,yarn.lock}"
+ - "{babel.config,jest.config}.js"
+ - ".csscomb.json"
+ - "Dockerfile.assets"
+ - "vendor/assets/**/*"
- ".gitlab/ci/**/*"
- ".{eslintignore,gitattributes,nvmrc,prettierrc,stylelintrc,yamllint}"
- ".{codeclimate,eslintrc,gitlab-ci,haml-lint,haml-lint_todo,rubocop,rubocop_todo,scss-lint}.yml"
- - ".csscomb.json"
- - "Dockerfile.assets"
- "*_VERSION"
- "Gemfile{,.lock}"
- "Rakefile"
- - "{babel.config,jest.config}.js"
- "config.ru"
- - "{package.json,yarn.lock}"
- "{,ee/}{app,bin,config,db,haml_lint,lib,locale,public,scripts,symbol,vendor}/**/*"
- "doc/api/graphql/reference/*" # Files in this folder are auto-generated
# QA changes
@@ -128,17 +139,18 @@
- "qa/**/*"
.code-backstage-qa-patterns: &code-backstage-qa-patterns
+ - "{package.json,yarn.lock}"
+ - "{babel.config,jest.config}.js"
+ - ".csscomb.json"
+ - "Dockerfile.assets"
+ - "vendor/assets/**/*"
- ".gitlab/ci/**/*"
- ".{eslintignore,gitattributes,nvmrc,prettierrc,stylelintrc,yamllint}"
- ".{codeclimate,eslintrc,gitlab-ci,haml-lint,haml-lint_todo,rubocop,rubocop_todo,scss-lint}.yml"
- - ".csscomb.json"
- - "Dockerfile.assets"
- "*_VERSION"
- "Gemfile{,.lock}"
- "Rakefile"
- - "{babel.config,jest.config}.js"
- "config.ru"
- - "{package.json,yarn.lock}"
- "{,ee/}{app,bin,config,db,haml_lint,lib,locale,public,scripts,symbol,vendor}/**/*"
- "doc/api/graphql/reference/*" # Files in this folder are auto-generated
# Backstage changes
@@ -417,7 +429,11 @@
- if: '$DAST_DISABLED || $GITLAB_FEATURES !~ /\bdast\b/'
when: never
- <<: *if-dot-com-gitlab-org-merge-request
+ changes: *frontend-patterns
+ when: on_success
+ - <<: *if-dot-com-gitlab-org-merge-request
changes: *code-qa-patterns
+ when: manual
.reports:schedule-dast:
rules:
@@ -428,7 +444,7 @@
################
# Review rules #
################
-.review:rules:mr-and-schedule:
+.review:rules:mr-and-schedule-auto:
rules:
- <<: *if-dot-com-gitlab-org-merge-request
changes: *code-qa-patterns
@@ -436,12 +452,33 @@
- <<: *if-dot-com-gitlab-org-schedule
when: on_success
+.review:rules:mr-and-schedule-auto-if-frontend-manual-otherwise:
+ rules:
+ - <<: *if-dot-com-gitlab-org-merge-request
+ changes: *frontend-patterns
+ when: on_success
+ - <<: *if-dot-com-gitlab-org-merge-request
+ changes: *code-qa-patterns
+ when: manual
+ allow_failure: true
+ - <<: *if-dot-com-gitlab-org-schedule
+ when: on_success
+
.review:rules:mr-only-auto:
rules:
- <<: *if-dot-com-gitlab-org-merge-request
changes: *code-qa-patterns
when: on_success
+.review:rules:mr-only-auto-if-frontend-manual-otherwise:
+ rules:
+ - <<: *if-dot-com-gitlab-org-merge-request
+ changes: *frontend-patterns
+ when: on_success
+ - <<: *if-dot-com-gitlab-org-merge-request
+ changes: *code-qa-patterns
+ when: manual
+
.review:rules:mr-only-manual:
rules:
- <<: *if-dot-com-gitlab-org-merge-request