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

Merge branch 'revert-f81b5aa9' into 'master'

Reverts 61578 to fix foss broken master [RUN ALL RSPEC]

See merge request gitlab-org/gitlab!62237
parents 32ae1801 ada8f0b4
...@@ -4,9 +4,8 @@ ...@@ -4,9 +4,8 @@
.if-not-canonical-namespace: &if-not-canonical-namespace .if-not-canonical-namespace: &if-not-canonical-namespace
if: '$CI_PROJECT_NAMESPACE !~ /^gitlab(-org)?($|\/)/' if: '$CI_PROJECT_NAMESPACE !~ /^gitlab(-org)?($|\/)/'
.exists-ee: &exists-ee .if-not-ee: &if-not-ee
exists: if: '$CI_PROJECT_NAME !~ /^gitlab(-ee)?$/'
- ee/**/*
.if-not-foss: &if-not-foss .if-not-foss: &if-not-foss
if: '$CI_PROJECT_NAME != "gitlab-foss" && $CI_PROJECT_NAME != "gitlab-ce" && $CI_PROJECT_NAME != "gitlabhq"' if: '$CI_PROJECT_NAME != "gitlab-foss" && $CI_PROJECT_NAME != "gitlab-ce" && $CI_PROJECT_NAME != "gitlabhq"'
...@@ -312,14 +311,13 @@ ...@@ -312,14 +311,13 @@
###################### ######################
.build-images:rules:build-qa-image: .build-images:rules:build-qa-image:
rules: rules:
- <<: *if-not-ee
when: never
- <<: *if-dot-com-gitlab-org-and-security-merge-request - <<: *if-dot-com-gitlab-org-and-security-merge-request
<<: *exists-ee
changes: *ci-build-images-patterns changes: *ci-build-images-patterns
- <<: *if-dot-com-gitlab-org-and-security-merge-request - <<: *if-dot-com-gitlab-org-and-security-merge-request
<<: *exists-ee
changes: *code-qa-patterns changes: *code-qa-patterns
- <<: *if-dot-com-gitlab-org-schedule - <<: *if-dot-com-gitlab-org-schedule
<<: *exists-ee
.build-images:rules:build-assets-image: .build-images:rules:build-assets-image:
rules: rules:
...@@ -365,8 +363,9 @@ ...@@ -365,8 +363,9 @@
.dev-fixtures:rules:ee-only: .dev-fixtures:rules:ee-only:
rules: rules:
- <<: *if-not-ee
when: never
- <<: *if-default-refs - <<: *if-default-refs
<<: *exists-ee
changes: *code-backstage-patterns changes: *code-backstage-patterns
when: on_success when: on_success
...@@ -392,8 +391,9 @@ ...@@ -392,8 +391,9 @@
.graphql:rules:graphql-verify: .graphql:rules:graphql-verify:
rules: rules:
- <<: *if-not-ee
when: never
- <<: *if-default-refs - <<: *if-default-refs
<<: *exists-ee
changes: *code-backstage-qa-patterns changes: *code-backstage-qa-patterns
when: on_success when: on_success
...@@ -414,8 +414,9 @@ ...@@ -414,8 +414,9 @@
.frontend:rules:compile-test-assets-as-if-foss: .frontend:rules:compile-test-assets-as-if-foss:
rules: rules:
- <<: *if-not-ee
when: never
- <<: *if-merge-request # Always run for MRs since `compile-test-assets as-if-foss` is either needed by `rspec foss-impact` or the `rspec * as-if-foss` jobs. - <<: *if-merge-request # Always run for MRs since `compile-test-assets as-if-foss` is either needed by `rspec foss-impact` or the `rspec * as-if-foss` jobs.
<<: *exists-ee
changes: *code-backstage-qa-patterns changes: *code-backstage-qa-patterns
.frontend:rules:default-frontend-jobs: .frontend:rules:default-frontend-jobs:
...@@ -425,37 +426,39 @@ ...@@ -425,37 +426,39 @@
.frontend:rules:default-frontend-jobs-ee: .frontend:rules:default-frontend-jobs-ee:
rules: rules:
- <<: *if-not-ee
when: never
- <<: *if-default-refs - <<: *if-default-refs
<<: *exists-ee
changes: *code-backstage-patterns changes: *code-backstage-patterns
.frontend:rules:default-frontend-jobs-as-if-foss: .frontend:rules:default-frontend-jobs-as-if-foss:
rules: rules:
- <<: *if-not-ee
when: never
- <<: *if-security-merge-request - <<: *if-security-merge-request
<<: *exists-ee
changes: *code-backstage-patterns changes: *code-backstage-patterns
- <<: *if-merge-request-title-as-if-foss - <<: *if-merge-request-title-as-if-foss
<<: *exists-ee
- <<: *if-merge-request-title-run-all-rspec - <<: *if-merge-request-title-run-all-rspec
<<: *exists-ee
- <<: *if-merge-request - <<: *if-merge-request
<<: *exists-ee
changes: *ci-patterns changes: *ci-patterns
.frontend:rules:eslint-as-if-foss: .frontend:rules:eslint-as-if-foss:
rules: rules:
- <<: *if-not-ee
when: never
- <<: *if-merge-request-title-as-if-foss
when: never
- <<: *if-merge-request - <<: *if-merge-request
<<: *exists-ee
changes: *frontend-patterns changes: *frontend-patterns
.frontend:rules:ee-mr-and-default-branch-only: .frontend:rules:ee-mr-and-default-branch-only:
rules: rules:
- <<: *if-not-ee
when: never
- <<: *if-merge-request - <<: *if-merge-request
<<: *exists-ee
changes: *code-backstage-patterns changes: *code-backstage-patterns
when: always when: always
- <<: *if-default-branch-refs - <<: *if-default-branch-refs
<<: *exists-ee
changes: *code-backstage-patterns changes: *code-backstage-patterns
.frontend:rules:qa-frontend-node: .frontend:rules:qa-frontend-node:
...@@ -496,8 +499,9 @@ ...@@ -496,8 +499,9 @@
############### ###############
.pages:rules: .pages:rules:
rules: rules:
- <<: *if-not-ee
when: never
- <<: *if-default-branch-schedule-2-hourly - <<: *if-default-branch-schedule-2-hourly
<<: *exists-ee
############ ############
# QA rules # # QA rules #
...@@ -510,34 +514,30 @@ ...@@ -510,34 +514,30 @@
.qa:rules:as-if-foss: .qa:rules:as-if-foss:
rules: rules:
- <<: *if-not-ee
when: never
- <<: *if-security-merge-request - <<: *if-security-merge-request
<<: *exists-ee
changes: *code-qa-patterns changes: *code-qa-patterns
- <<: *if-merge-request-title-as-if-foss - <<: *if-merge-request-title-as-if-foss
<<: *exists-ee
- <<: *if-merge-request-title-run-all-rspec - <<: *if-merge-request-title-run-all-rspec
<<: *exists-ee
- <<: *if-merge-request - <<: *if-merge-request
<<: *exists-ee
changes: *ci-patterns changes: *ci-patterns
.qa:rules:package-and-qa: .qa:rules:package-and-qa:
rules: rules:
- <<: *if-not-ee
when: never
- <<: *if-dot-com-gitlab-org-and-security-merge-request - <<: *if-dot-com-gitlab-org-and-security-merge-request
<<: *exists-ee
changes: *ci-qa-patterns changes: *ci-qa-patterns
allow_failure: true allow_failure: true
- <<: *if-dot-com-gitlab-org-and-security-merge-request - <<: *if-dot-com-gitlab-org-and-security-merge-request
<<: *exists-ee
changes: *qa-patterns changes: *qa-patterns
allow_failure: true allow_failure: true
- <<: *if-dot-com-gitlab-org-and-security-merge-request - <<: *if-dot-com-gitlab-org-and-security-merge-request
<<: *exists-ee
changes: *code-patterns changes: *code-patterns
when: manual when: manual
allow_failure: true allow_failure: true
- <<: *if-dot-com-gitlab-org-schedule - <<: *if-dot-com-gitlab-org-schedule
<<: *exists-ee
allow_failure: true allow_failure: true
############### ###############
...@@ -649,13 +649,15 @@ ...@@ -649,13 +649,15 @@
.rails:rules:ee-only-migration: .rails:rules:ee-only-migration:
rules: rules:
- <<: *exists-ee - <<: *if-not-ee
changes: *db-patterns when: never
- changes: *db-patterns
- <<: *if-merge-request-title-run-all-rspec - <<: *if-merge-request-title-run-all-rspec
<<: *exists-ee
.rails:rules:ee-only-migration:minimal: .rails:rules:ee-only-migration:minimal:
rules: rules:
- <<: *if-not-ee
when: never
- <<: *if-merge-request-rspec-minimal-disabled - <<: *if-merge-request-rspec-minimal-disabled
when: never when: never
- <<: *if-merge-request-title-run-all-rspec - <<: *if-merge-request-title-run-all-rspec
...@@ -664,18 +666,19 @@ ...@@ -664,18 +666,19 @@
changes: *ci-patterns changes: *ci-patterns
when: never when: never
- <<: *if-merge-request - <<: *if-merge-request
<<: *exists-ee
changes: *db-patterns changes: *db-patterns
.rails:rules:ee-only-unit: .rails:rules:ee-only-unit:
rules: rules:
- <<: *exists-ee - <<: *if-not-ee
changes: *backend-patterns when: never
- changes: *backend-patterns
- <<: *if-merge-request-title-run-all-rspec - <<: *if-merge-request-title-run-all-rspec
<<: *exists-ee
.rails:rules:ee-only-unit:minimal: .rails:rules:ee-only-unit:minimal:
rules: rules:
- <<: *if-not-ee
when: never
- <<: *if-merge-request-rspec-minimal-disabled - <<: *if-merge-request-rspec-minimal-disabled
when: never when: never
- <<: *if-merge-request-title-run-all-rspec - <<: *if-merge-request-title-run-all-rspec
...@@ -684,18 +687,19 @@ ...@@ -684,18 +687,19 @@
changes: *ci-patterns changes: *ci-patterns
when: never when: never
- <<: *if-merge-request - <<: *if-merge-request
<<: *exists-ee
changes: *backend-patterns changes: *backend-patterns
.rails:rules:ee-only-integration: .rails:rules:ee-only-integration:
rules: rules:
- <<: *exists-ee - <<: *if-not-ee
changes: *backend-patterns when: never
- changes: *backend-patterns
- <<: *if-merge-request-title-run-all-rspec - <<: *if-merge-request-title-run-all-rspec
<<: *exists-ee
.rails:rules:ee-only-integration:minimal: .rails:rules:ee-only-integration:minimal:
rules: rules:
- <<: *if-not-ee
when: never
- <<: *if-merge-request-rspec-minimal-disabled - <<: *if-merge-request-rspec-minimal-disabled
when: never when: never
- <<: *if-merge-request-title-run-all-rspec - <<: *if-merge-request-title-run-all-rspec
...@@ -704,18 +708,19 @@ ...@@ -704,18 +708,19 @@
changes: *ci-patterns changes: *ci-patterns
when: never when: never
- <<: *if-merge-request - <<: *if-merge-request
<<: *exists-ee
changes: *backend-patterns changes: *backend-patterns
.rails:rules:ee-only-system: .rails:rules:ee-only-system:
rules: rules:
- <<: *exists-ee - <<: *if-not-ee
changes: *code-backstage-patterns when: never
- changes: *code-backstage-patterns
- <<: *if-merge-request-title-run-all-rspec - <<: *if-merge-request-title-run-all-rspec
<<: *exists-ee
.rails:rules:ee-only-system:minimal: .rails:rules:ee-only-system:minimal:
rules: rules:
- <<: *if-not-ee
when: never
- <<: *if-merge-request-rspec-minimal-disabled - <<: *if-merge-request-rspec-minimal-disabled
when: never when: never
- <<: *if-merge-request-title-run-all-rspec - <<: *if-merge-request-title-run-all-rspec
...@@ -724,143 +729,129 @@ ...@@ -724,143 +729,129 @@
changes: *ci-patterns changes: *ci-patterns
when: never when: never
- <<: *if-merge-request - <<: *if-merge-request
<<: *exists-ee
changes: *code-backstage-patterns changes: *code-backstage-patterns
.rails:rules:as-if-foss-migration: .rails:rules:as-if-foss-migration:
rules: rules:
- <<: *if-not-ee
when: never
- <<: *if-security-merge-request - <<: *if-security-merge-request
<<: *exists-ee
changes: *db-patterns changes: *db-patterns
- <<: *if-merge-request-title-as-if-foss - <<: *if-merge-request-title-as-if-foss
<<: *exists-ee
changes: *db-patterns changes: *db-patterns
- <<: *if-merge-request-title-run-all-rspec - <<: *if-merge-request-title-run-all-rspec
<<: *exists-ee
- <<: *if-merge-request - <<: *if-merge-request
<<: *exists-ee
changes: *ci-patterns changes: *ci-patterns
.rails:rules:as-if-foss-migration:minimal: .rails:rules:as-if-foss-migration:minimal:
rules: rules:
- <<: *if-not-ee
when: never
- <<: *if-merge-request-rspec-minimal-disabled - <<: *if-merge-request-rspec-minimal-disabled
when: never when: never
- <<: *if-merge-request - <<: *if-merge-request
changes: *ci-patterns changes: *ci-patterns
when: never when: never
- <<: *if-security-merge-request - <<: *if-security-merge-request
<<: *exists-ee
changes: *db-patterns changes: *db-patterns
- <<: *if-merge-request-title-as-if-foss - <<: *if-merge-request-title-as-if-foss
<<: *exists-ee
changes: *db-patterns changes: *db-patterns
- <<: *if-merge-request-title-run-all-rspec - <<: *if-merge-request-title-run-all-rspec
<<: *exists-ee
.rails:rules:as-if-foss-unit: .rails:rules:as-if-foss-unit:
rules: rules:
- <<: *if-not-ee
when: never
- <<: *if-security-merge-request - <<: *if-security-merge-request
<<: *exists-ee
changes: *backend-patterns changes: *backend-patterns
- <<: *if-merge-request-title-as-if-foss - <<: *if-merge-request-title-as-if-foss
<<: *exists-ee
changes: *backend-patterns changes: *backend-patterns
- <<: *if-merge-request-title-run-all-rspec - <<: *if-merge-request-title-run-all-rspec
<<: *exists-ee
- <<: *if-merge-request - <<: *if-merge-request
<<: *exists-ee
changes: *ci-patterns changes: *ci-patterns
.rails:rules:as-if-foss-unit:minimal: .rails:rules:as-if-foss-unit:minimal:
rules: rules:
- <<: *if-not-ee
when: never
- <<: *if-merge-request-rspec-minimal-disabled - <<: *if-merge-request-rspec-minimal-disabled
when: never when: never
- <<: *if-merge-request - <<: *if-merge-request
changes: *ci-patterns changes: *ci-patterns
when: never when: never
- <<: *if-security-merge-request - <<: *if-security-merge-request
<<: *exists-ee
changes: *backend-patterns changes: *backend-patterns
- <<: *if-merge-request-title-as-if-foss - <<: *if-merge-request-title-as-if-foss
<<: *exists-ee
changes: *backend-patterns changes: *backend-patterns
- <<: *if-merge-request-title-run-all-rspec
.rails:rules:as-if-foss-integration: .rails:rules:as-if-foss-integration:
rules: rules:
- <<: *if-not-ee
when: never
- <<: *if-security-merge-request - <<: *if-security-merge-request
<<: *exists-ee
changes: *backend-patterns changes: *backend-patterns
- <<: *if-merge-request-title-as-if-foss - <<: *if-merge-request-title-as-if-foss
<<: *exists-ee
changes: *backend-patterns changes: *backend-patterns
- <<: *if-merge-request-title-run-all-rspec - <<: *if-merge-request-title-run-all-rspec
<<: *exists-ee
- <<: *if-merge-request - <<: *if-merge-request
<<: *exists-ee
changes: *ci-patterns changes: *ci-patterns
.rails:rules:as-if-foss-integration:minimal: .rails:rules:as-if-foss-integration:minimal:
rules: rules:
- <<: *if-not-ee
when: never
- <<: *if-merge-request-rspec-minimal-disabled - <<: *if-merge-request-rspec-minimal-disabled
when: never when: never
- <<: *if-merge-request - <<: *if-merge-request
changes: *ci-patterns changes: *ci-patterns
when: never when: never
- <<: *if-security-merge-request - <<: *if-security-merge-request
<<: *exists-ee
changes: *backend-patterns changes: *backend-patterns
- <<: *if-merge-request-title-as-if-foss - <<: *if-merge-request-title-as-if-foss
<<: *exists-ee
changes: *backend-patterns changes: *backend-patterns
- <<: *if-merge-request-title-run-all-rspec - <<: *if-merge-request-title-run-all-rspec
<<: *exists-ee
.rails:rules:as-if-foss-system: .rails:rules:as-if-foss-system:
rules: rules:
- <<: *if-not-ee
when: never
- <<: *if-security-merge-request - <<: *if-security-merge-request
<<: *exists-ee
changes: *code-backstage-patterns changes: *code-backstage-patterns
- <<: *if-merge-request-title-as-if-foss - <<: *if-merge-request-title-as-if-foss
<<: *exists-ee
changes: *code-backstage-patterns changes: *code-backstage-patterns
- <<: *if-merge-request-title-run-all-rspec - <<: *if-merge-request-title-run-all-rspec
<<: *exists-ee
- <<: *if-merge-request - <<: *if-merge-request
<<: *exists-ee
changes: *ci-patterns changes: *ci-patterns
.rails:rules:as-if-foss-system:minimal: .rails:rules:as-if-foss-system:minimal:
rules: rules:
- <<: *if-not-ee
when: never
- <<: *if-merge-request-rspec-minimal-disabled - <<: *if-merge-request-rspec-minimal-disabled
when: never when: never
- <<: *if-merge-request - <<: *if-merge-request
changes: *ci-patterns changes: *ci-patterns
when: never when: never
- <<: *if-security-merge-request - <<: *if-security-merge-request
<<: *exists-ee
changes: *code-backstage-patterns changes: *code-backstage-patterns
- <<: *if-merge-request-title-as-if-foss - <<: *if-merge-request-title-as-if-foss
<<: *exists-ee
changes: *code-backstage-patterns changes: *code-backstage-patterns
- <<: *if-merge-request-title-run-all-rspec - <<: *if-merge-request-title-run-all-rspec
<<: *exists-ee
.rails:rules:ee-and-foss-db-library-code: .rails:rules:ee-and-foss-db-library-code:
rules: rules:
- <<: *exists-ee - changes: *db-library-patterns
changes: *db-library-patterns
- <<: *if-merge-request-title-run-all-rspec - <<: *if-merge-request-title-run-all-rspec
<<: *exists-ee
.rails:rules:ee-mr-and-default-branch-only: .rails:rules:ee-mr-and-default-branch-only:
rules: rules:
- <<: *if-not-ee
when: never
- <<: *if-merge-request-title-run-all-rspec - <<: *if-merge-request-title-run-all-rspec
<<: *exists-ee
- <<: *if-merge-request - <<: *if-merge-request
<<: *exists-ee
changes: *code-backstage-patterns changes: *code-backstage-patterns
- <<: *if-default-branch-refs - <<: *if-default-branch-refs
<<: *exists-ee
changes: *code-backstage-patterns changes: *code-backstage-patterns
.rails:rules:detect-tests: .rails:rules:detect-tests:
...@@ -870,13 +861,13 @@ ...@@ -870,13 +861,13 @@
.rails:rules:rspec-foss-impact: .rails:rules:rspec-foss-impact:
rules: rules:
- <<: *if-not-ee
when: never
- <<: *if-merge-request-title-as-if-foss - <<: *if-merge-request-title-as-if-foss
when: never when: never
- <<: *if-security-merge-request - <<: *if-security-merge-request
<<: *exists-ee
changes: *code-backstage-patterns changes: *code-backstage-patterns
- <<: *if-dot-com-gitlab-org-merge-request - <<: *if-dot-com-gitlab-org-merge-request
<<: *exists-ee
changes: *code-backstage-patterns changes: *code-backstage-patterns
.rails:rules:rspec fail-fast: .rails:rules:rspec fail-fast:
...@@ -885,11 +876,11 @@ ...@@ -885,11 +876,11 @@
when: never when: never
- <<: *if-rspec-fail-fast-skipped - <<: *if-rspec-fail-fast-skipped
when: never when: never
- <<: *if-not-ee
when: never
- <<: *if-security-merge-request - <<: *if-security-merge-request
<<: *exists-ee
changes: *code-backstage-patterns changes: *code-backstage-patterns
- <<: *if-dot-com-gitlab-org-merge-request - <<: *if-dot-com-gitlab-org-merge-request
<<: *exists-ee
changes: *code-backstage-patterns changes: *code-backstage-patterns
.rails:rules:fail-pipeline-early: .rails:rules:fail-pipeline-early:
...@@ -898,41 +889,40 @@ ...@@ -898,41 +889,40 @@
when: never when: never
- <<: *if-rspec-fail-fast-skipped - <<: *if-rspec-fail-fast-skipped
when: never when: never
- <<: *if-not-ee
when: never
- <<: *if-security-merge-request - <<: *if-security-merge-request
<<: *exists-ee
changes: *code-backstage-patterns changes: *code-backstage-patterns
when: on_failure when: on_failure
- <<: *if-dot-com-gitlab-org-merge-request - <<: *if-dot-com-gitlab-org-merge-request
<<: *exists-ee
changes: *code-backstage-patterns changes: *code-backstage-patterns
when: on_failure when: on_failure
.rails:rules:deprecations: .rails:rules:deprecations:
rules: rules:
- <<: *if-not-ee
when: never
- <<: *if-default-branch-schedule-nightly - <<: *if-default-branch-schedule-nightly
<<: *exists-ee
- <<: *if-merge-request-title-run-all-rspec - <<: *if-merge-request-title-run-all-rspec
<<: *exists-ee
.rails:rules:rspec-coverage: .rails:rules:rspec-coverage:
rules: rules:
- <<: *if-not-ee
when: never
- <<: *if-merge-request - <<: *if-merge-request
<<: *exists-ee
changes: *code-backstage-patterns changes: *code-backstage-patterns
when: always when: always
- <<: *if-default-branch-schedule-2-hourly - <<: *if-default-branch-schedule-2-hourly
<<: *exists-ee
- <<: *if-merge-request-title-run-all-rspec - <<: *if-merge-request-title-run-all-rspec
<<: *exists-ee
when: always when: always
.rails:rules:rspec-feature-flags: .rails:rules:rspec-feature-flags:
rules: rules:
- <<: *if-not-ee
when: never
- <<: *if-default-branch-schedule-2-hourly - <<: *if-default-branch-schedule-2-hourly
<<: *exists-ee
allow_failure: true allow_failure: true
- <<: *if-merge-request-title-run-all-rspec - <<: *if-merge-request-title-run-all-rspec
<<: *exists-ee
.rails:rules:default-branch-schedule-nightly--code-backstage: .rails:rules:default-branch-schedule-nightly--code-backstage:
rules: rules:
...@@ -942,10 +932,10 @@ ...@@ -942,10 +932,10 @@
.rails:rules:default-branch-schedule-nightly--code-backstage-ee-only: .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only:
rules: rules:
- <<: *if-not-ee
when: never
- <<: *if-default-branch-schedule-nightly - <<: *if-default-branch-schedule-nightly
<<: *exists-ee
- <<: *if-merge-request - <<: *if-merge-request
<<: *exists-ee
changes: [".gitlab/ci/rails.gitlab-ci.yml"] changes: [".gitlab/ci/rails.gitlab-ci.yml"]
######################### #########################
...@@ -958,14 +948,13 @@ ...@@ -958,14 +948,13 @@
.static-analysis:rules:as-if-foss: .static-analysis:rules:as-if-foss:
rules: rules:
- <<: *if-not-ee
when: never
- <<: *if-merge-request-title-as-if-foss - <<: *if-merge-request-title-as-if-foss
<<: *exists-ee
changes: *code-backstage-qa-patterns changes: *code-backstage-qa-patterns
- <<: *if-security-merge-request - <<: *if-security-merge-request
<<: *exists-ee
changes: *code-backstage-qa-patterns changes: *code-backstage-qa-patterns
- <<: *if-merge-request - <<: *if-merge-request
<<: *exists-ee
changes: *ci-patterns changes: *ci-patterns
####################### #######################
...@@ -1071,116 +1060,108 @@ ...@@ -1071,116 +1060,108 @@
################ ################
.review:rules:review-build-cng: .review:rules:review-build-cng:
rules: rules:
- <<: *if-not-ee
when: never
- <<: *if-dot-com-gitlab-org-merge-request - <<: *if-dot-com-gitlab-org-merge-request
<<: *exists-ee
changes: *ci-review-patterns changes: *ci-review-patterns
- <<: *if-dot-com-gitlab-org-merge-request - <<: *if-dot-com-gitlab-org-merge-request
<<: *exists-ee
changes: *frontend-patterns changes: *frontend-patterns
- <<: *if-dot-com-gitlab-org-merge-request - <<: *if-dot-com-gitlab-org-merge-request
<<: *exists-ee
changes: *code-patterns changes: *code-patterns
when: manual when: manual
allow_failure: true allow_failure: true
- <<: *if-dot-com-gitlab-org-merge-request - <<: *if-dot-com-gitlab-org-merge-request
<<: *exists-ee
changes: *qa-patterns changes: *qa-patterns
allow_failure: true allow_failure: true
- <<: *if-dot-com-gitlab-org-schedule - <<: *if-dot-com-gitlab-org-schedule
<<: *exists-ee
.review:rules:review-deploy: .review:rules:review-deploy:
rules: rules:
- <<: *if-not-ee
when: never
- <<: *if-dot-com-gitlab-org-merge-request - <<: *if-dot-com-gitlab-org-merge-request
<<: *exists-ee
changes: *ci-review-patterns changes: *ci-review-patterns
- <<: *if-dot-com-gitlab-org-merge-request - <<: *if-dot-com-gitlab-org-merge-request
<<: *exists-ee
changes: *frontend-patterns changes: *frontend-patterns
allow_failure: true allow_failure: true
- <<: *if-dot-com-gitlab-org-merge-request - <<: *if-dot-com-gitlab-org-merge-request
<<: *exists-ee
changes: *code-patterns changes: *code-patterns
allow_failure: true allow_failure: true
- <<: *if-dot-com-gitlab-org-merge-request - <<: *if-dot-com-gitlab-org-merge-request
<<: *exists-ee
changes: *qa-patterns changes: *qa-patterns
allow_failure: true allow_failure: true
- <<: *if-dot-com-gitlab-org-schedule - <<: *if-dot-com-gitlab-org-schedule
<<: *exists-ee
allow_failure: true allow_failure: true
.review:rules:review-performance: .review:rules:review-performance:
rules: rules:
- if: '$DAST_RUN == "true"' # Skip this job when DAST is run - if: '$DAST_RUN == "true"' # Skip this job when DAST is run
when: never when: never
- <<: *if-not-ee
when: never
- <<: *if-dot-com-gitlab-org-merge-request - <<: *if-dot-com-gitlab-org-merge-request
<<: *exists-ee
changes: *ci-review-patterns changes: *ci-review-patterns
- <<: *if-dot-com-gitlab-org-merge-request - <<: *if-dot-com-gitlab-org-merge-request
<<: *exists-ee
changes: *frontend-patterns changes: *frontend-patterns
allow_failure: true allow_failure: true
- <<: *if-dot-com-gitlab-org-merge-request - <<: *if-dot-com-gitlab-org-merge-request
<<: *exists-ee
changes: *code-qa-patterns changes: *code-qa-patterns
allow_failure: true allow_failure: true
- <<: *if-dot-com-gitlab-org-schedule - <<: *if-dot-com-gitlab-org-schedule
<<: *exists-ee
allow_failure: true allow_failure: true
.review:rules:review-stop-failed-deployment: .review:rules:review-stop-failed-deployment:
rules: rules:
- <<: *if-not-ee
when: never
- <<: *if-dot-com-gitlab-org-merge-request - <<: *if-dot-com-gitlab-org-merge-request
<<: *exists-ee
changes: *code-qa-patterns changes: *code-qa-patterns
.review:rules:review-qa-smoke: .review:rules:review-qa-smoke:
rules: rules:
- <<: *if-not-ee
when: never
- <<: *if-dot-com-gitlab-org-merge-request - <<: *if-dot-com-gitlab-org-merge-request
<<: *exists-ee
changes: *ci-review-patterns changes: *ci-review-patterns
- <<: *if-dot-com-gitlab-org-merge-request - <<: *if-dot-com-gitlab-org-merge-request
<<: *exists-ee
changes: *frontend-patterns changes: *frontend-patterns
allow_failure: true allow_failure: true
- <<: *if-dot-com-gitlab-org-merge-request - <<: *if-dot-com-gitlab-org-merge-request
<<: *exists-ee
changes: *code-qa-patterns changes: *code-qa-patterns
allow_failure: true allow_failure: true
.review:rules:review-qa-all: .review:rules:review-qa-all:
rules: rules:
- <<: *if-not-ee
when: never
- <<: *if-dot-com-gitlab-org-merge-request - <<: *if-dot-com-gitlab-org-merge-request
<<: *exists-ee
changes: *code-patterns changes: *code-patterns
when: manual when: manual
allow_failure: true allow_failure: true
- <<: *if-dot-com-gitlab-org-merge-request - <<: *if-dot-com-gitlab-org-merge-request
<<: *exists-ee
changes: *qa-patterns changes: *qa-patterns
allow_failure: true allow_failure: true
.review:rules:review-cleanup: .review:rules:review-cleanup:
rules: rules:
- <<: *if-not-ee
when: never
- <<: *if-dot-com-gitlab-org-merge-request - <<: *if-dot-com-gitlab-org-merge-request
<<: *exists-ee
changes: *code-qa-patterns changes: *code-qa-patterns
when: manual when: manual
allow_failure: true allow_failure: true
- <<: *if-dot-com-gitlab-org-schedule - <<: *if-dot-com-gitlab-org-schedule
<<: *exists-ee
allow_failure: true allow_failure: true
.review:rules:review-stop: .review:rules:review-stop:
rules: rules:
- <<: *if-not-ee
when: never
- <<: *if-dot-com-gitlab-org-merge-request - <<: *if-dot-com-gitlab-org-merge-request
<<: *exists-ee
changes: *code-qa-patterns changes: *code-qa-patterns
when: manual when: manual
allow_failure: true allow_failure: true
- <<: *if-dot-com-gitlab-org-schedule - <<: *if-dot-com-gitlab-org-schedule
<<: *exists-ee
allow_failure: true allow_failure: true
.review:rules:danger: .review:rules:danger:
...@@ -1223,8 +1204,9 @@ ...@@ -1223,8 +1204,9 @@
.setup:rules:verify-tests-yml: .setup:rules:verify-tests-yml:
rules: rules:
- <<: *if-not-ee
when: never
- <<: *if-default-refs - <<: *if-default-refs
<<: *exists-ee
changes: *code-backstage-patterns changes: *code-backstage-patterns
when: on_success when: on_success
...@@ -1239,12 +1221,12 @@ ...@@ -1239,12 +1221,12 @@
.test-metadata:rules:update-tests-metadata: .test-metadata:rules:update-tests-metadata:
rules: rules:
- <<: *exists-ee - <<: *if-not-ee
changes: when: never
- changes:
- ".gitlab/ci/test-metadata.gitlab-ci.yml" - ".gitlab/ci/test-metadata.gitlab-ci.yml"
- "scripts/rspec_helpers.sh" - "scripts/rspec_helpers.sh"
- <<: *if-dot-com-ee-schedule - <<: *if-dot-com-ee-schedule
<<: *exists-ee
################### ###################
# workhorse rules # # workhorse rules #
......
...@@ -758,6 +758,7 @@ and included in `rules` definitions via [YAML anchors](../ci/yaml/README.md#anch ...@@ -758,6 +758,7 @@ and included in `rules` definitions via [YAML anchors](../ci/yaml/README.md#anch
| `if:` conditions | Description | Notes | | `if:` conditions | Description | Notes |
|------------------|-------------|-------| |------------------|-------------|-------|
| `if-not-canonical-namespace` | Matches if the project isn't in the canonical (`gitlab-org/`) or security (`gitlab-org/security`) namespace. | Use to create a job for forks (by using `when: on_success|manual`), or **not** create a job for forks (by using `when: never`). | | `if-not-canonical-namespace` | Matches if the project isn't in the canonical (`gitlab-org/`) or security (`gitlab-org/security`) namespace. | Use to create a job for forks (by using `when: on_success|manual`), or **not** create a job for forks (by using `when: never`). |
| `if-not-ee` | Matches if the project isn't EE (i.e. project name isn't `gitlab` or `gitlab-ee`). | Use to create a job only in the FOSS project (by using `when: on_success|manual`), or **not** create a job if the project is EE (by using `when: never`). |
| `if-not-foss` | Matches if the project isn't FOSS (i.e. project name isn't `gitlab-foss`, `gitlab-ce`, or `gitlabhq`). | Use to create a job only in the EE project (by using `when: on_success|manual`), or **not** create a job if the project is FOSS (by using `when: never`). | | `if-not-foss` | Matches if the project isn't FOSS (i.e. project name isn't `gitlab-foss`, `gitlab-ce`, or `gitlabhq`). | Use to create a job only in the EE project (by using `when: on_success|manual`), or **not** create a job if the project is FOSS (by using `when: never`). |
| `if-default-refs` | Matches if the pipeline is for `master`, `main`, `/^[\d-]+-stable(-ee)?$/` (stable branches), `/^\d+-\d+-auto-deploy-\d+$/` (auto-deploy branches), `/^security\//` (security branches), merge requests, and tags. | Note that jobs aren't created for branches with this default configuration. | | `if-default-refs` | Matches if the pipeline is for `master`, `main`, `/^[\d-]+-stable(-ee)?$/` (stable branches), `/^\d+-\d+-auto-deploy-\d+$/` (auto-deploy branches), `/^security\//` (security branches), merge requests, and tags. | Note that jobs aren't created for branches with this default configuration. |
| `if-master-refs` | Matches if the current branch is `master` or `main`. | | | `if-master-refs` | Matches if the current branch is `master` or `main`. | |
...@@ -787,16 +788,6 @@ and included in `rules` definitions via [YAML anchors](../ci/yaml/README.md#anch ...@@ -787,16 +788,6 @@ and included in `rules` definitions via [YAML anchors](../ci/yaml/README.md#anch
<!-- vale gitlab.Substitutions = YES --> <!-- vale gitlab.Substitutions = YES -->
#### `exists:` conditions
<!-- vale gitlab.Substitutions = NO -->
| `exists:` conditions | Description | Notes |
|----------------------|-------------|-------|
| `exists-ee` | Matches if the project is EE (i.e. project contains `ee/` directory). | Use to create a job only in the EE project. |
<!-- vale gitlab.Substitutions = YES -->
#### `changes:` patterns #### `changes:` patterns
| `changes:` patterns | Description | | `changes:` patterns | Description |
......
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