Commit 3e7832fe authored by Ash McKenzie's avatar Ash McKenzie

Merge branch 'include-workhorse-patterns-in-code-backstage-qa-patterns' into 'master'

ci: Introduce .rails:rules:setup-test-env to match Workhorse changes

See merge request gitlab-org/gitlab!73280
parents cd56feb8 47037c3c
...@@ -182,7 +182,7 @@ setup-test-env: ...@@ -182,7 +182,7 @@ setup-test-env:
extends: extends:
- .rails-job-base - .rails-job-base
- .setup-test-env-cache - .setup-test-env-cache
- .rails:rules:code-backstage-qa - .rails:rules:setup-test-env
stage: prepare stage: prepare
variables: variables:
SETUP_DB: "false" SETUP_DB: "false"
......
...@@ -211,6 +211,7 @@ ...@@ -211,6 +211,7 @@
.startup-css-patterns: &startup-css-patterns .startup-css-patterns: &startup-css-patterns
- "{,ee/,jh/}app/assets/stylesheets/startup/**/*" - "{,ee/,jh/}app/assets/stylesheets/startup/**/*"
# Backend patterns + .ci-patterns
.backend-patterns: &backend-patterns .backend-patterns: &backend-patterns
- "{,jh/}Gemfile{,.lock}" - "{,jh/}Gemfile{,.lock}"
- "Rakefile" - "Rakefile"
...@@ -224,6 +225,7 @@ ...@@ -224,6 +225,7 @@
- ".gitlab/ci/**/*" - ".gitlab/ci/**/*"
- "*_VERSION" - "*_VERSION"
# DB patterns + .ci-patterns
.db-patterns: &db-patterns .db-patterns: &db-patterns
- "{,ee/,jh/}{,spec/}{db,migrations}/**/*" - "{,ee/,jh/}{,spec/}{db,migrations}/**/*"
- "{,ee/,jh/}{,spec/}lib/{,ee/,jh/}gitlab/database/**/*" - "{,ee/,jh/}{,spec/}lib/{,ee/,jh/}gitlab/database/**/*"
...@@ -252,6 +254,11 @@ ...@@ -252,6 +254,11 @@
- "{,ee/,jh/}spec/**/*" - "{,ee/,jh/}spec/**/*"
- "{,spec/}tooling/**/*" - "{,spec/}tooling/**/*"
.qa-patterns: &qa-patterns
- ".dockerignore"
- "qa/**/*"
# Code patterns + .ci-patterns + .workhorse-patterns
.code-patterns: &code-patterns .code-patterns: &code-patterns
- "{package.json,yarn.lock}" - "{package.json,yarn.lock}"
- ".browserslistrc" - ".browserslistrc"
...@@ -260,9 +267,6 @@ ...@@ -260,9 +267,6 @@
- ".csscomb.json" - ".csscomb.json"
- "Dockerfile.assets" - "Dockerfile.assets"
- "vendor/assets/**/*" - "vendor/assets/**/*"
# CI changes
- ".gitlab-ci.yml"
- ".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,rubocop_manual_todo}.yml" - ".{codeclimate,eslintrc,gitlab-ci,haml-lint,haml-lint_todo,rubocop,rubocop_todo,rubocop_manual_todo}.yml"
- "*_VERSION" - "*_VERSION"
...@@ -273,11 +277,11 @@ ...@@ -273,11 +277,11 @@
- "{,ee/,jh/}{app,bin,config,db,generator_templates,haml_lint,lib,locale,public,scripts,symbol,vendor}/**/*" - "{,ee/,jh/}{app,bin,config,db,generator_templates,haml_lint,lib,locale,public,scripts,symbol,vendor}/**/*"
- "doc/api/graphql/reference/*" # Files in this folder are auto-generated - "doc/api/graphql/reference/*" # Files in this folder are auto-generated
- "data/whats_new/*.yml" - "data/whats_new/*.yml"
# CI changes
- ".gitlab-ci.yml"
- ".gitlab/ci/**/*"
.qa-patterns: &qa-patterns # .code-patterns + .backstage-patterns
- ".dockerignore"
- "qa/**/*"
.code-backstage-patterns: &code-backstage-patterns .code-backstage-patterns: &code-backstage-patterns
- "{package.json,yarn.lock}" - "{package.json,yarn.lock}"
- ".browserslistrc" - ".browserslistrc"
...@@ -286,9 +290,6 @@ ...@@ -286,9 +290,6 @@
- ".csscomb.json" - ".csscomb.json"
- "Dockerfile.assets" - "Dockerfile.assets"
- "vendor/assets/**/*" - "vendor/assets/**/*"
# CI changes
- ".gitlab-ci.yml"
- ".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,rubocop_manual_todo}.yml" - ".{codeclimate,eslintrc,gitlab-ci,haml-lint,haml-lint_todo,rubocop,rubocop_todo,rubocop_manual_todo}.yml"
- "*_VERSION" - "*_VERSION"
...@@ -299,6 +300,9 @@ ...@@ -299,6 +300,9 @@
- "{,ee/,jh/}{app,bin,config,db,generator_templates,haml_lint,lib,locale,public,scripts,symbol,vendor}/**/*" - "{,ee/,jh/}{app,bin,config,db,generator_templates,haml_lint,lib,locale,public,scripts,symbol,vendor}/**/*"
- "doc/api/graphql/reference/*" # Files in this folder are auto-generated - "doc/api/graphql/reference/*" # Files in this folder are auto-generated
- "data/whats_new/*.yml" - "data/whats_new/*.yml"
# CI changes
- ".gitlab-ci.yml"
- ".gitlab/ci/**/*"
# Backstage changes # Backstage changes
- "Dangerfile" - "Dangerfile"
- "danger/**/*" - "danger/**/*"
...@@ -307,6 +311,7 @@ ...@@ -307,6 +311,7 @@
- "{,ee/,jh/}spec/**/*" - "{,ee/,jh/}spec/**/*"
- "{,spec/}tooling/**/*" - "{,spec/}tooling/**/*"
# .code-patterns + .qa-patterns
.code-qa-patterns: &code-qa-patterns .code-qa-patterns: &code-qa-patterns
- "{package.json,yarn.lock}" - "{package.json,yarn.lock}"
- ".browserslistrc" - ".browserslistrc"
...@@ -315,9 +320,6 @@ ...@@ -315,9 +320,6 @@
- ".csscomb.json" - ".csscomb.json"
- "Dockerfile.assets" - "Dockerfile.assets"
- "vendor/assets/**/*" - "vendor/assets/**/*"
# CI changes
- ".gitlab-ci.yml"
- ".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,rubocop_manual_todo}.yml" - ".{codeclimate,eslintrc,gitlab-ci,haml-lint,haml-lint_todo,rubocop,rubocop_todo,rubocop_manual_todo}.yml"
- "*_VERSION" - "*_VERSION"
...@@ -328,10 +330,14 @@ ...@@ -328,10 +330,14 @@
- "{,ee/,jh/}{app,bin,config,db,generator_templates,haml_lint,lib,locale,public,scripts,symbol,vendor}/**/*" - "{,ee/,jh/}{app,bin,config,db,generator_templates,haml_lint,lib,locale,public,scripts,symbol,vendor}/**/*"
- "doc/api/graphql/reference/*" # Files in this folder are auto-generated - "doc/api/graphql/reference/*" # Files in this folder are auto-generated
- "data/whats_new/*.yml" - "data/whats_new/*.yml"
# CI changes
- ".gitlab-ci.yml"
- ".gitlab/ci/**/*"
# QA changes # QA changes
- ".dockerignore" - ".dockerignore"
- "qa/**/*" - "qa/**/*"
# .code-patterns + .backstage-patterns + .qa-patterns
.code-backstage-qa-patterns: &code-backstage-qa-patterns .code-backstage-qa-patterns: &code-backstage-qa-patterns
- "{package.json,yarn.lock}" - "{package.json,yarn.lock}"
- ".browserslistrc" - ".browserslistrc"
...@@ -340,9 +346,39 @@ ...@@ -340,9 +346,39 @@
- ".csscomb.json" - ".csscomb.json"
- "Dockerfile.assets" - "Dockerfile.assets"
- "vendor/assets/**/*" - "vendor/assets/**/*"
- ".{eslintignore,gitattributes,nvmrc,prettierrc,stylelintrc,yamllint}"
- ".{codeclimate,eslintrc,gitlab-ci,haml-lint,haml-lint_todo,rubocop,rubocop_todo,rubocop_manual_todo}.yml"
- "*_VERSION"
- "{,jh/}Gemfile{,.lock}"
- "Rakefile"
- "tests.yml"
- "config.ru"
- "{,ee/,jh/}{app,bin,config,db,generator_templates,haml_lint,lib,locale,public,scripts,symbol,vendor}/**/*"
- "doc/api/graphql/reference/*" # Files in this folder are auto-generated
- "data/whats_new/*.yml"
# CI changes # CI changes
- ".gitlab-ci.yml" - ".gitlab-ci.yml"
- ".gitlab/ci/**/*" - ".gitlab/ci/**/*"
# Backstage changes
- "Dangerfile"
- "danger/**/*"
- "{,ee/,jh/}fixtures/**/*"
- "{,ee/,jh/}rubocop/**/*"
- "{,ee/,jh/}spec/**/*"
- "{,spec/}tooling/**/*"
# QA changes
- ".dockerignore"
- "qa/**/*"
# .code-backstage-qa-patterns + .workhorse-patterns
.setup-test-env-patterns: &setup-test-env-patterns
- "{package.json,yarn.lock}"
- ".browserslistrc"
- "babel.config.js"
- "jest.config.{base,integration,unit}.js"
- ".csscomb.json"
- "Dockerfile.assets"
- "vendor/assets/**/*"
- ".{eslintignore,gitattributes,nvmrc,prettierrc,stylelintrc,yamllint}" - ".{eslintignore,gitattributes,nvmrc,prettierrc,stylelintrc,yamllint}"
- ".{codeclimate,eslintrc,gitlab-ci,haml-lint,haml-lint_todo,rubocop,rubocop_todo,rubocop_manual_todo}.yml" - ".{codeclimate,eslintrc,gitlab-ci,haml-lint,haml-lint_todo,rubocop,rubocop_todo,rubocop_manual_todo}.yml"
- "*_VERSION" - "*_VERSION"
...@@ -353,6 +389,9 @@ ...@@ -353,6 +389,9 @@
- "{,ee/,jh/}{app,bin,config,db,generator_templates,haml_lint,lib,locale,public,scripts,symbol,vendor}/**/*" - "{,ee/,jh/}{app,bin,config,db,generator_templates,haml_lint,lib,locale,public,scripts,symbol,vendor}/**/*"
- "doc/api/graphql/reference/*" # Files in this folder are auto-generated - "doc/api/graphql/reference/*" # Files in this folder are auto-generated
- "data/whats_new/*.yml" - "data/whats_new/*.yml"
# CI changes
- ".gitlab-ci.yml"
- ".gitlab/ci/**/*"
# Backstage changes # Backstage changes
- "Dangerfile" - "Dangerfile"
- "danger/**/*" - "danger/**/*"
...@@ -363,9 +402,12 @@ ...@@ -363,9 +402,12 @@
# QA changes # QA changes
- ".dockerignore" - ".dockerignore"
- "qa/**/*" - "qa/**/*"
# Workhorse changes
- "GITLAB_WORKHORSE_VERSION"
- "workhorse/**/*"
- ".gitlab/ci/workhorse.gitlab-ci.yml"
.code-backstage-danger-patterns: &code-backstage-danger-patterns .danger-patterns: &danger-patterns
# Backstage changes
- "Dangerfile" - "Dangerfile"
- "danger/**/*" - "danger/**/*"
- "tooling/danger/**/*" - "tooling/danger/**/*"
...@@ -713,6 +755,11 @@ ...@@ -713,6 +755,11 @@
############### ###############
# Rails rules # # Rails rules #
############### ###############
.rails:rules:setup-test-env:
rules:
- changes: *setup-test-env-patterns
- <<: *if-merge-request-labels-run-all-rspec
.rails:rules:decomposed-databases: .rails:rules:decomposed-databases:
rules: rules:
- <<: *if-merge-request-labels-run-decomposed - <<: *if-merge-request-labels-run-decomposed
...@@ -1632,7 +1679,7 @@ ...@@ -1632,7 +1679,7 @@
.review:rules:danger-local: .review:rules:danger-local:
rules: rules:
- if: '$CI_MERGE_REQUEST_IID' - if: '$CI_MERGE_REQUEST_IID'
changes: *code-backstage-danger-patterns changes: *danger-patterns
############### ###############
# Setup rules # # Setup rules #
......
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