Commit 13113802 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Merge branch '30121-optimize-review-apps-where-we-do-not-need-them' into 'master'

Don't run Review App jobs for backstage changes

Closes #30121

See merge request gitlab-org/gitlab!17822
parents 8b029c11 5c7b5646
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
extends: extends:
- .default-tags - .default-tags
- .default-retry - .default-retry
- .only-docs-changes - .only:changes-docs
only: only:
refs: refs:
- merge_requests - merge_requests
...@@ -50,7 +50,7 @@ docs lint: ...@@ -50,7 +50,7 @@ docs lint:
- .default-tags - .default-tags
- .default-retry - .default-retry
- .default-only - .default-only
- .only-docs-changes - .only:changes-docs
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:gitlab-docs-lint" image: "registry.gitlab.com/gitlab-org/gitlab-build-images:gitlab-docs-lint"
stage: test stage: test
dependencies: [] dependencies: []
...@@ -76,7 +76,7 @@ graphql-docs-verify: ...@@ -76,7 +76,7 @@ graphql-docs-verify:
- .default-cache - .default-cache
- .default-only - .default-only
- .default-before_script - .default-before_script
- .only-graphql-changes - .only:changes-graphql
variables: variables:
SETUP_DB: "false" SETUP_DB: "false"
stage: test stage: test
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
- .default-only - .default-only
- .default-before_script - .default-before_script
- .assets-compile-cache - .assets-compile-cache
- .only-code-qa-changes - .only:changes-code-backstage-qa
image: registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.3-git-2.22-chrome-73.0-node-12.x-yarn-1.16-graphicsmagick-1.3.33-docker-18.06.1 image: registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.3-git-2.22-chrome-73.0-node-12.x-yarn-1.16-graphicsmagick-1.3.33-docker-18.06.1
stage: test stage: test
dependencies: ["setup-test-env"] dependencies: ["setup-test-env"]
...@@ -73,7 +73,7 @@ gitlab:assets:compile pull-cache: ...@@ -73,7 +73,7 @@ gitlab:assets:compile pull-cache:
- .default-only - .default-only
- .default-before_script - .default-before_script
- .assets-compile-cache - .assets-compile-cache
- .only-code-qa-changes - .only:changes-code-backstage-qa
- .use-pg9 - .use-pg9
stage: prepare stage: prepare
script: script:
...@@ -128,7 +128,7 @@ compile-assets pull-cache foss: ...@@ -128,7 +128,7 @@ compile-assets pull-cache foss:
- .default-cache - .default-cache
- .default-only - .default-only
- .default-before_script - .default-before_script
- .only-code-changes - .only:changes-code-backstage
- .use-pg9 - .use-pg9
stage: test stage: test
needs: ["setup-test-env", "compile-assets pull-cache"] needs: ["setup-test-env", "compile-assets pull-cache"]
...@@ -205,7 +205,7 @@ jest-foss: ...@@ -205,7 +205,7 @@ jest-foss:
- .default-retry - .default-retry
- .default-cache - .default-cache
- .default-only - .default-only
- .only-code-changes - .only:changes-code-backstage
stage: test stage: test
dependencies: [] dependencies: []
cache: cache:
...@@ -238,7 +238,7 @@ webpack-dev-server: ...@@ -238,7 +238,7 @@ webpack-dev-server:
- .default-retry - .default-retry
- .default-cache - .default-cache
- .default-only - .default-only
- .only-code-changes - .only:changes-code-backstage
stage: test stage: test
needs: ["setup-test-env", "compile-assets pull-cache"] needs: ["setup-test-env", "compile-assets pull-cache"]
dependencies: ["setup-test-env", "compile-assets pull-cache"] dependencies: ["setup-test-env", "compile-assets pull-cache"]
......
...@@ -40,14 +40,64 @@ ...@@ -40,14 +40,64 @@
- merge_requests - merge_requests
- tags - tags
.only-code-changes: .code-patterns: &code-patterns
- ".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}/**/*"
.backstage-patterns: &backstage-patterns
- "Dangerfile"
- "danger/**/*"
- "{,ee/}fixtures/**/*"
- "{,ee/}rubocop/**/*"
- "{,ee/}spec/**/*"
- "doc/README.md" # Some RSpec test rely on this file
.qa-patterns: &qa-patterns
- ".dockerignore"
- "qa/**/*"
.docs-patterns: &docs-patterns
- ".gitlab/route-map.yml"
- "doc/**/*"
- ".markdownlint.json"
.graphql-patterns: &graphql-patterns
- "{,ee/}app/graphql/**/*"
- "{,ee/}lib/gitlab/graphql/**/*"
.only:changes-code:
only:
changes: *code-patterns
.only:changes-qa:
only:
changes: *qa-patterns
.only:changes-docs:
only:
changes: *docs-patterns
.only:changes-graphql:
only:
changes: *graphql-patterns
.only:changes-code-backstage:
only: only:
changes: changes:
- ".gitlab/ci/**/*" - ".gitlab/ci/**/*"
- ".{eslintignore,gitattributes,nvmrc,prettierrc,stylelintrc,yamllint}" - ".{eslintignore,gitattributes,nvmrc,prettierrc,stylelintrc,yamllint}"
- ".{codeclimate,eslintrc,gitlab-ci,haml-lint,haml-lint_todo,rubocop,rubocop_todo,scss-lint}.yml" - ".{codeclimate,eslintrc,gitlab-ci,haml-lint,haml-lint_todo,rubocop,rubocop_todo,scss-lint}.yml"
- ".csscomb.json" - ".csscomb.json"
- "Dangerfile"
- "Dockerfile.assets" - "Dockerfile.assets"
- "*_VERSION" - "*_VERSION"
- "Gemfile{,.lock}" - "Gemfile{,.lock}"
...@@ -55,36 +105,41 @@ ...@@ -55,36 +105,41 @@
- "{babel.config,jest.config}.js" - "{babel.config,jest.config}.js"
- "config.ru" - "config.ru"
- "{package.json,yarn.lock}" - "{package.json,yarn.lock}"
- "{app,bin,config,danger,db,ee,fixtures,haml_lint,lib,locale,public,rubocop,scripts,spec,symbol,vendor}/**/*" - "{,ee/}{app,bin,config,db,haml_lint,lib,locale,public,scripts,symbol,vendor}/**/*"
# Backstage changes
- "Dangerfile"
- "danger/**/*"
- "{,ee/}fixtures/**/*"
- "{,ee/}rubocop/**/*"
- "{,ee/}spec/**/*"
- "doc/README.md" # Some RSpec test rely on this file - "doc/README.md" # Some RSpec test rely on this file
.only-qa-changes: .only:changes-code-qa:
only: only:
changes: changes:
- ".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}/**/*"
# QA changes
- ".dockerignore" - ".dockerignore"
- "qa/**/*" - "qa/**/*"
.only-docs-changes: .only:changes-code-backstage-qa:
only:
changes:
- ".gitlab/route-map.yml"
- "doc/**/*"
- ".markdownlint.json"
.only-graphql-changes:
only:
changes:
- "{,ee/}app/graphql/**/*"
- "{,ee/}lib/gitlab/graphql/**/*"
.only-code-qa-changes:
only: only:
changes: changes:
- ".gitlab/ci/**/*" - ".gitlab/ci/**/*"
- ".{eslintignore,gitattributes,nvmrc,prettierrc,stylelintrc,yamllint}" - ".{eslintignore,gitattributes,nvmrc,prettierrc,stylelintrc,yamllint}"
- ".{codeclimate,eslintrc,gitlab-ci,haml-lint,haml-lint_todo,rubocop,rubocop_todo,scss-lint}.yml" - ".{codeclimate,eslintrc,gitlab-ci,haml-lint,haml-lint_todo,rubocop,rubocop_todo,scss-lint}.yml"
- ".csscomb.json" - ".csscomb.json"
- "Dangerfile"
- "Dockerfile.assets" - "Dockerfile.assets"
- "*_VERSION" - "*_VERSION"
- "Gemfile{,.lock}" - "Gemfile{,.lock}"
...@@ -92,8 +147,15 @@ ...@@ -92,8 +147,15 @@
- "{babel.config,jest.config}.js" - "{babel.config,jest.config}.js"
- "config.ru" - "config.ru"
- "{package.json,yarn.lock}" - "{package.json,yarn.lock}"
- "{app,bin,config,danger,db,ee,fixtures,haml_lint,lib,locale,public,rubocop,scripts,spec,symbol,vendor}/**/*" - "{,ee/}{app,bin,config,db,haml_lint,lib,locale,public,scripts,symbol,vendor}/**/*"
# Backstage changes
- "Dangerfile"
- "danger/**/*"
- "{,ee/}fixtures/**/*"
- "{,ee/}rubocop/**/*"
- "{,ee/}spec/**/*"
- "doc/README.md" # Some RSpec test rely on this file - "doc/README.md" # Some RSpec test rely on this file
# QA changes
- ".dockerignore" - ".dockerignore"
- "qa/**/*" - "qa/**/*"
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
- .default-cache - .default-cache
- .default-only - .default-only
- .default-before_script - .default-before_script
- .only-code-changes - .only:changes-code
memory-static: memory-static:
extends: .only-code-memory-job-base extends: .only-code-memory-job-base
......
...@@ -4,7 +4,7 @@ pages: ...@@ -4,7 +4,7 @@ pages:
- .default-retry - .default-retry
- .default-cache - .default-cache
- .default-only - .default-only
- .only-code-qa-changes - .only:changes-code-backstage-qa
only: only:
refs: refs:
- master - master
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
- .default-tags - .default-tags
- .default-retry - .default-retry
- .default-only - .default-only
- .only-code-qa-changes - .only:changes-code-qa
stage: test stage: test
dependencies: [] dependencies: []
cache: cache:
...@@ -47,7 +47,7 @@ qa:selectors-foss: ...@@ -47,7 +47,7 @@ qa:selectors-foss:
package-and-qa-manual: package-and-qa-manual:
extends: extends:
- .package-and-qa-base - .package-and-qa-base
- .only-code-changes - .only:changes-code
except: except:
refs: refs:
- master - master
...@@ -58,7 +58,7 @@ package-and-qa-manual: ...@@ -58,7 +58,7 @@ package-and-qa-manual:
package-and-qa: package-and-qa:
extends: extends:
- .package-and-qa-base - .package-and-qa-base
- .only-qa-changes - .only:changes-qa
except: except:
refs: refs:
- master - master
...@@ -69,6 +69,6 @@ package-and-qa: ...@@ -69,6 +69,6 @@ package-and-qa:
schedule:package-and-qa: schedule:package-and-qa:
extends: extends:
- .package-and-qa-base - .package-and-qa-base
- .only-code-qa-changes - .only:changes-code-qa
- .only-canonical-schedules - .only-canonical-schedules
needs: ["build-qa-image", "gitlab:assets:compile pull-cache"] needs: ["build-qa-image", "gitlab:assets:compile pull-cache"]
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
- .default-cache - .default-cache
- .default-only - .default-only
- .default-before_script - .default-before_script
- .only-code-changes - .only:changes-code-backstage
.only-code-qa-rails-job-base: .only-code-qa-rails-job-base:
extends: extends:
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
- .default-cache - .default-cache
- .default-only - .default-only
- .default-before_script - .default-before_script
- .only-code-qa-changes - .only:changes-code-backstage-qa
setup-test-env: setup-test-env:
extends: extends:
...@@ -251,7 +251,7 @@ static-analysis: ...@@ -251,7 +251,7 @@ static-analysis:
downtime_check: downtime_check:
extends: extends:
- .rake-exec - .rake-exec
- .only-code-changes - .only:changes-code-backstage
except: except:
refs: refs:
- master - master
......
...@@ -11,7 +11,7 @@ code_quality: ...@@ -11,7 +11,7 @@ code_quality:
extends: extends:
- .default-retry - .default-retry
- .default-only - .default-only
- .only-code-changes - .only:changes-code-backstage
stage: test stage: test
image: docker:stable image: docker:stable
allow_failure: true allow_failure: true
...@@ -50,7 +50,7 @@ sast: ...@@ -50,7 +50,7 @@ sast:
extends: extends:
- .default-retry - .default-retry
- .default-only - .default-only
- .only-code-changes - .only:changes-code-backstage-qa
stage: test stage: test
image: docker:stable image: docker:stable
variables: variables:
...@@ -132,7 +132,7 @@ dependency_scanning: ...@@ -132,7 +132,7 @@ dependency_scanning:
extends: extends:
- .default-retry - .default-retry
- .default-only - .default-only
- .only-code-changes - .only:changes-code-backstage-qa
stage: test stage: test
image: docker:stable image: docker:stable
variables: variables:
...@@ -195,7 +195,7 @@ dast: ...@@ -195,7 +195,7 @@ dast:
extends: extends:
- .default-retry - .default-retry
- .default-only - .default-only
- .only-code-qa-changes - .only:changes-code-qa
- .only-review - .only-review
stage: qa stage: qa
needs: ["review-deploy"] needs: ["review-deploy"]
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
build-qa-image: build-qa-image:
extends: extends:
- .review-docker - .review-docker
- .only-code-qa-changes - .only:changes-code-qa
only: only:
variables: variables:
- $CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE == "gitlab-org" - $CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE == "gitlab-org"
...@@ -40,7 +40,7 @@ build-qa-image: ...@@ -40,7 +40,7 @@ build-qa-image:
- .default-tags - .default-tags
- .default-retry - .default-retry
- .default-only - .default-only
- .only-code-qa-changes - .only:changes-code-qa
stage: prepare stage: prepare
image: registry.gitlab.com/gitlab-org/gitlab-build-images:gitlab-charts-build-base image: registry.gitlab.com/gitlab-org/gitlab-build-images:gitlab-charts-build-base
allow_failure: true allow_failure: true
...@@ -66,7 +66,7 @@ manual:review-cleanup: ...@@ -66,7 +66,7 @@ manual:review-cleanup:
.review-build-cng-base: .review-build-cng-base:
extends: extends:
- .default-only - .default-only
- .only-code-qa-changes - .only:changes-code-qa
- .except-deploys - .except-deploys
image: ruby:2.6-alpine image: ruby:2.6-alpine
stage: review-prepare stage: review-prepare
...@@ -95,7 +95,7 @@ schedule:review-build-cng: ...@@ -95,7 +95,7 @@ schedule:review-build-cng:
- .default-tags - .default-tags
- .default-retry - .default-retry
- .default-only - .default-only
- .only-code-qa-changes - .only:changes-code-qa
- .except-deploys - .except-deploys
stage: review stage: review
image: registry.gitlab.com/gitlab-org/gitlab-build-images:gitlab-charts-build-base image: registry.gitlab.com/gitlab-org/gitlab-build-images:gitlab-charts-build-base
...@@ -189,7 +189,7 @@ review-cleanup-failed-deployment: ...@@ -189,7 +189,7 @@ review-cleanup-failed-deployment:
extends: extends:
- .review-docker - .review-docker
- .only-review - .only-review
- .only-code-qa-changes - .only:changes-code-qa
stage: qa stage: qa
allow_failure: true allow_failure: true
variables: variables:
...@@ -236,7 +236,7 @@ review-qa-all: ...@@ -236,7 +236,7 @@ review-qa-all:
.review-performance-base: .review-performance-base:
extends: extends:
- .review-docker - .review-docker
- .only-code-qa-changes - .only:changes-code-qa
stage: qa stage: qa
allow_failure: true allow_failure: true
before_script: before_script:
...@@ -288,7 +288,7 @@ parallel-spec-reports: ...@@ -288,7 +288,7 @@ parallel-spec-reports:
extends: extends:
- .default-tags - .default-tags
- .default-only - .default-only
- .only-code-qa-changes - .only:changes-code-qa
- .only-review - .only-review
- .except-deploys - .except-deploys
image: ruby:2.6-alpine image: ruby:2.6-alpine
......
...@@ -6,7 +6,7 @@ cache gems: ...@@ -6,7 +6,7 @@ cache gems:
- .default-retry - .default-retry
- .default-cache - .default-cache
- .default-before_script - .default-before_script
- .only-code-qa-changes - .only:changes-code-backstage-qa
stage: test stage: test
dependencies: ["setup-test-env"] dependencies: ["setup-test-env"]
needs: ["setup-test-env"] needs: ["setup-test-env"]
...@@ -29,7 +29,7 @@ cache gems: ...@@ -29,7 +29,7 @@ cache gems:
- .default-tags - .default-tags
- .default-retry - .default-retry
- .default-only - .default-only
- .only-code-changes - .only:changes-code-backstage
dependencies: [] dependencies: []
gitlab_git_test: gitlab_git_test:
......
.tests-metadata-state: .tests-metadata-state:
extends: extends:
- .default-only - .default-only
- .only-code-changes - .only:changes-code-backstage
variables: variables:
TESTS_METADATA_S3_BUCKET: "gitlab-ce-cache" TESTS_METADATA_S3_BUCKET: "gitlab-ce-cache"
before_script: before_script:
...@@ -48,7 +48,7 @@ flaky-examples-check: ...@@ -48,7 +48,7 @@ flaky-examples-check:
- .default-tags - .default-tags
- .default-retry - .default-retry
- .default-only - .default-only
- .only-code-changes - .only:changes-code-backstage
image: ruby:2.6-alpine image: ruby:2.6-alpine
stage: post-test stage: post-test
variables: variables:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment