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 @@
.if-not-canonical-namespace: &if-not-canonical-namespace
if: '$CI_PROJECT_NAMESPACE !~ /^gitlab(-org)?($|\/)/'
.exists-ee: &exists-ee
exists:
- ee/**/*
.if-not-ee: &if-not-ee
if: '$CI_PROJECT_NAME !~ /^gitlab(-ee)?$/'
.if-not-foss: &if-not-foss
if: '$CI_PROJECT_NAME != "gitlab-foss" && $CI_PROJECT_NAME != "gitlab-ce" && $CI_PROJECT_NAME != "gitlabhq"'
......@@ -312,14 +311,13 @@
######################
.build-images:rules:build-qa-image:
rules:
- <<: *if-not-ee
when: never
- <<: *if-dot-com-gitlab-org-and-security-merge-request
<<: *exists-ee
changes: *ci-build-images-patterns
- <<: *if-dot-com-gitlab-org-and-security-merge-request
<<: *exists-ee
changes: *code-qa-patterns
- <<: *if-dot-com-gitlab-org-schedule
<<: *exists-ee
.build-images:rules:build-assets-image:
rules:
......@@ -365,8 +363,9 @@
.dev-fixtures:rules:ee-only:
rules:
- <<: *if-not-ee
when: never
- <<: *if-default-refs
<<: *exists-ee
changes: *code-backstage-patterns
when: on_success
......@@ -392,8 +391,9 @@
.graphql:rules:graphql-verify:
rules:
- <<: *if-not-ee
when: never
- <<: *if-default-refs
<<: *exists-ee
changes: *code-backstage-qa-patterns
when: on_success
......@@ -414,8 +414,9 @@
.frontend:rules:compile-test-assets-as-if-foss:
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.
<<: *exists-ee
changes: *code-backstage-qa-patterns
.frontend:rules:default-frontend-jobs:
......@@ -425,37 +426,39 @@
.frontend:rules:default-frontend-jobs-ee:
rules:
- <<: *if-not-ee
when: never
- <<: *if-default-refs
<<: *exists-ee
changes: *code-backstage-patterns
.frontend:rules:default-frontend-jobs-as-if-foss:
rules:
- <<: *if-not-ee
when: never
- <<: *if-security-merge-request
<<: *exists-ee
changes: *code-backstage-patterns
- <<: *if-merge-request-title-as-if-foss
<<: *exists-ee
- <<: *if-merge-request-title-run-all-rspec
<<: *exists-ee
- <<: *if-merge-request
<<: *exists-ee
changes: *ci-patterns
.frontend:rules:eslint-as-if-foss:
rules:
- <<: *if-not-ee
when: never
- <<: *if-merge-request-title-as-if-foss
when: never
- <<: *if-merge-request
<<: *exists-ee
changes: *frontend-patterns
.frontend:rules:ee-mr-and-default-branch-only:
rules:
- <<: *if-not-ee
when: never
- <<: *if-merge-request
<<: *exists-ee
changes: *code-backstage-patterns
when: always
- <<: *if-default-branch-refs
<<: *exists-ee
changes: *code-backstage-patterns
.frontend:rules:qa-frontend-node:
......@@ -496,8 +499,9 @@
###############
.pages:rules:
rules:
- <<: *if-not-ee
when: never
- <<: *if-default-branch-schedule-2-hourly
<<: *exists-ee
############
# QA rules #
......@@ -510,34 +514,30 @@
.qa:rules:as-if-foss:
rules:
- <<: *if-not-ee
when: never
- <<: *if-security-merge-request
<<: *exists-ee
changes: *code-qa-patterns
- <<: *if-merge-request-title-as-if-foss
<<: *exists-ee
- <<: *if-merge-request-title-run-all-rspec
<<: *exists-ee
- <<: *if-merge-request
<<: *exists-ee
changes: *ci-patterns
.qa:rules:package-and-qa:
rules:
- <<: *if-not-ee
when: never
- <<: *if-dot-com-gitlab-org-and-security-merge-request
<<: *exists-ee
changes: *ci-qa-patterns
allow_failure: true
- <<: *if-dot-com-gitlab-org-and-security-merge-request
<<: *exists-ee
changes: *qa-patterns
allow_failure: true
- <<: *if-dot-com-gitlab-org-and-security-merge-request
<<: *exists-ee
changes: *code-patterns
when: manual
allow_failure: true
- <<: *if-dot-com-gitlab-org-schedule
<<: *exists-ee
allow_failure: true
###############
......@@ -649,13 +649,15 @@
.rails:rules:ee-only-migration:
rules:
- <<: *exists-ee
changes: *db-patterns
- <<: *if-not-ee
when: never
- changes: *db-patterns
- <<: *if-merge-request-title-run-all-rspec
<<: *exists-ee
.rails:rules:ee-only-migration:minimal:
rules:
- <<: *if-not-ee
when: never
- <<: *if-merge-request-rspec-minimal-disabled
when: never
- <<: *if-merge-request-title-run-all-rspec
......@@ -664,18 +666,19 @@
changes: *ci-patterns
when: never
- <<: *if-merge-request
<<: *exists-ee
changes: *db-patterns
.rails:rules:ee-only-unit:
rules:
- <<: *exists-ee
changes: *backend-patterns
- <<: *if-not-ee
when: never
- changes: *backend-patterns
- <<: *if-merge-request-title-run-all-rspec
<<: *exists-ee
.rails:rules:ee-only-unit:minimal:
rules:
- <<: *if-not-ee
when: never
- <<: *if-merge-request-rspec-minimal-disabled
when: never
- <<: *if-merge-request-title-run-all-rspec
......@@ -684,18 +687,19 @@
changes: *ci-patterns
when: never
- <<: *if-merge-request
<<: *exists-ee
changes: *backend-patterns
.rails:rules:ee-only-integration:
rules:
- <<: *exists-ee
changes: *backend-patterns
- <<: *if-not-ee
when: never
- changes: *backend-patterns
- <<: *if-merge-request-title-run-all-rspec
<<: *exists-ee
.rails:rules:ee-only-integration:minimal:
rules:
- <<: *if-not-ee
when: never
- <<: *if-merge-request-rspec-minimal-disabled
when: never
- <<: *if-merge-request-title-run-all-rspec
......@@ -704,18 +708,19 @@
changes: *ci-patterns
when: never
- <<: *if-merge-request
<<: *exists-ee
changes: *backend-patterns
.rails:rules:ee-only-system:
rules:
- <<: *exists-ee
changes: *code-backstage-patterns
- <<: *if-not-ee
when: never
- changes: *code-backstage-patterns
- <<: *if-merge-request-title-run-all-rspec
<<: *exists-ee
.rails:rules:ee-only-system:minimal:
rules:
- <<: *if-not-ee
when: never
- <<: *if-merge-request-rspec-minimal-disabled
when: never
- <<: *if-merge-request-title-run-all-rspec
......@@ -724,143 +729,129 @@
changes: *ci-patterns
when: never
- <<: *if-merge-request
<<: *exists-ee
changes: *code-backstage-patterns
.rails:rules:as-if-foss-migration:
rules:
- <<: *if-not-ee
when: never
- <<: *if-security-merge-request
<<: *exists-ee
changes: *db-patterns
- <<: *if-merge-request-title-as-if-foss
<<: *exists-ee
changes: *db-patterns
- <<: *if-merge-request-title-run-all-rspec
<<: *exists-ee
- <<: *if-merge-request
<<: *exists-ee
changes: *ci-patterns
.rails:rules:as-if-foss-migration:minimal:
rules:
- <<: *if-not-ee
when: never
- <<: *if-merge-request-rspec-minimal-disabled
when: never
- <<: *if-merge-request
changes: *ci-patterns
when: never
- <<: *if-security-merge-request
<<: *exists-ee
changes: *db-patterns
- <<: *if-merge-request-title-as-if-foss
<<: *exists-ee
changes: *db-patterns
- <<: *if-merge-request-title-run-all-rspec
<<: *exists-ee
.rails:rules:as-if-foss-unit:
rules:
- <<: *if-not-ee
when: never
- <<: *if-security-merge-request
<<: *exists-ee
changes: *backend-patterns
- <<: *if-merge-request-title-as-if-foss
<<: *exists-ee
changes: *backend-patterns
- <<: *if-merge-request-title-run-all-rspec
<<: *exists-ee
- <<: *if-merge-request
<<: *exists-ee
changes: *ci-patterns
.rails:rules:as-if-foss-unit:minimal:
rules:
- <<: *if-not-ee
when: never
- <<: *if-merge-request-rspec-minimal-disabled
when: never
- <<: *if-merge-request
changes: *ci-patterns
when: never
- <<: *if-security-merge-request
<<: *exists-ee
changes: *backend-patterns
- <<: *if-merge-request-title-as-if-foss
<<: *exists-ee
changes: *backend-patterns
- <<: *if-merge-request-title-run-all-rspec
.rails:rules:as-if-foss-integration:
rules:
- <<: *if-not-ee
when: never
- <<: *if-security-merge-request
<<: *exists-ee
changes: *backend-patterns
- <<: *if-merge-request-title-as-if-foss
<<: *exists-ee
changes: *backend-patterns
- <<: *if-merge-request-title-run-all-rspec
<<: *exists-ee
- <<: *if-merge-request
<<: *exists-ee
changes: *ci-patterns
.rails:rules:as-if-foss-integration:minimal:
rules:
- <<: *if-not-ee
when: never
- <<: *if-merge-request-rspec-minimal-disabled
when: never
- <<: *if-merge-request
changes: *ci-patterns
when: never
- <<: *if-security-merge-request
<<: *exists-ee
changes: *backend-patterns
- <<: *if-merge-request-title-as-if-foss
<<: *exists-ee
changes: *backend-patterns
- <<: *if-merge-request-title-run-all-rspec
<<: *exists-ee
.rails:rules:as-if-foss-system:
rules:
- <<: *if-not-ee
when: never
- <<: *if-security-merge-request
<<: *exists-ee
changes: *code-backstage-patterns
- <<: *if-merge-request-title-as-if-foss
<<: *exists-ee
changes: *code-backstage-patterns
- <<: *if-merge-request-title-run-all-rspec
<<: *exists-ee
- <<: *if-merge-request
<<: *exists-ee
changes: *ci-patterns
.rails:rules:as-if-foss-system:minimal:
rules:
- <<: *if-not-ee
when: never
- <<: *if-merge-request-rspec-minimal-disabled
when: never
- <<: *if-merge-request
changes: *ci-patterns
when: never
- <<: *if-security-merge-request
<<: *exists-ee
changes: *code-backstage-patterns
- <<: *if-merge-request-title-as-if-foss
<<: *exists-ee
changes: *code-backstage-patterns
- <<: *if-merge-request-title-run-all-rspec
<<: *exists-ee
.rails:rules:ee-and-foss-db-library-code:
rules:
- <<: *exists-ee
changes: *db-library-patterns
- changes: *db-library-patterns
- <<: *if-merge-request-title-run-all-rspec
<<: *exists-ee
.rails:rules:ee-mr-and-default-branch-only:
rules:
- <<: *if-not-ee
when: never
- <<: *if-merge-request-title-run-all-rspec
<<: *exists-ee
- <<: *if-merge-request
<<: *exists-ee
changes: *code-backstage-patterns
- <<: *if-default-branch-refs
<<: *exists-ee
changes: *code-backstage-patterns
.rails:rules:detect-tests:
......@@ -870,13 +861,13 @@
.rails:rules:rspec-foss-impact:
rules:
- <<: *if-not-ee
when: never
- <<: *if-merge-request-title-as-if-foss
when: never
- <<: *if-security-merge-request
<<: *exists-ee
changes: *code-backstage-patterns
- <<: *if-dot-com-gitlab-org-merge-request
<<: *exists-ee
changes: *code-backstage-patterns
.rails:rules:rspec fail-fast:
......@@ -885,11 +876,11 @@
when: never
- <<: *if-rspec-fail-fast-skipped
when: never
- <<: *if-not-ee
when: never
- <<: *if-security-merge-request
<<: *exists-ee
changes: *code-backstage-patterns
- <<: *if-dot-com-gitlab-org-merge-request
<<: *exists-ee
changes: *code-backstage-patterns
.rails:rules:fail-pipeline-early:
......@@ -898,41 +889,40 @@
when: never
- <<: *if-rspec-fail-fast-skipped
when: never
- <<: *if-not-ee
when: never
- <<: *if-security-merge-request
<<: *exists-ee
changes: *code-backstage-patterns
when: on_failure
- <<: *if-dot-com-gitlab-org-merge-request
<<: *exists-ee
changes: *code-backstage-patterns
when: on_failure
.rails:rules:deprecations:
rules:
- <<: *if-not-ee
when: never
- <<: *if-default-branch-schedule-nightly
<<: *exists-ee
- <<: *if-merge-request-title-run-all-rspec
<<: *exists-ee
.rails:rules:rspec-coverage:
rules:
- <<: *if-not-ee
when: never
- <<: *if-merge-request
<<: *exists-ee
changes: *code-backstage-patterns
when: always
- <<: *if-default-branch-schedule-2-hourly
<<: *exists-ee
- <<: *if-merge-request-title-run-all-rspec
<<: *exists-ee
when: always
.rails:rules:rspec-feature-flags:
rules:
- <<: *if-not-ee
when: never
- <<: *if-default-branch-schedule-2-hourly
<<: *exists-ee
allow_failure: true
- <<: *if-merge-request-title-run-all-rspec
<<: *exists-ee
.rails:rules:default-branch-schedule-nightly--code-backstage:
rules:
......@@ -942,10 +932,10 @@
.rails:rules:default-branch-schedule-nightly--code-backstage-ee-only:
rules:
- <<: *if-not-ee
when: never
- <<: *if-default-branch-schedule-nightly
<<: *exists-ee
- <<: *if-merge-request
<<: *exists-ee
changes: [".gitlab/ci/rails.gitlab-ci.yml"]
#########################
......@@ -958,14 +948,13 @@
.static-analysis:rules:as-if-foss:
rules:
- <<: *if-not-ee
when: never
- <<: *if-merge-request-title-as-if-foss
<<: *exists-ee
changes: *code-backstage-qa-patterns
- <<: *if-security-merge-request
<<: *exists-ee
changes: *code-backstage-qa-patterns
- <<: *if-merge-request
<<: *exists-ee
changes: *ci-patterns
#######################
......@@ -1071,116 +1060,108 @@
################
.review:rules:review-build-cng:
rules:
- <<: *if-not-ee
when: never
- <<: *if-dot-com-gitlab-org-merge-request
<<: *exists-ee
changes: *ci-review-patterns
- <<: *if-dot-com-gitlab-org-merge-request
<<: *exists-ee
changes: *frontend-patterns
- <<: *if-dot-com-gitlab-org-merge-request
<<: *exists-ee
changes: *code-patterns
when: manual
allow_failure: true
- <<: *if-dot-com-gitlab-org-merge-request
<<: *exists-ee
changes: *qa-patterns
allow_failure: true
- <<: *if-dot-com-gitlab-org-schedule
<<: *exists-ee
.review:rules:review-deploy:
rules:
- <<: *if-not-ee
when: never
- <<: *if-dot-com-gitlab-org-merge-request
<<: *exists-ee
changes: *ci-review-patterns
- <<: *if-dot-com-gitlab-org-merge-request
<<: *exists-ee
changes: *frontend-patterns
allow_failure: true
- <<: *if-dot-com-gitlab-org-merge-request
<<: *exists-ee
changes: *code-patterns
allow_failure: true
- <<: *if-dot-com-gitlab-org-merge-request
<<: *exists-ee
changes: *qa-patterns
allow_failure: true
- <<: *if-dot-com-gitlab-org-schedule
<<: *exists-ee
allow_failure: true
.review:rules:review-performance:
rules:
- if: '$DAST_RUN == "true"' # Skip this job when DAST is run
when: never
- <<: *if-not-ee
when: never
- <<: *if-dot-com-gitlab-org-merge-request
<<: *exists-ee
changes: *ci-review-patterns
- <<: *if-dot-com-gitlab-org-merge-request
<<: *exists-ee
changes: *frontend-patterns
allow_failure: true
- <<: *if-dot-com-gitlab-org-merge-request
<<: *exists-ee
changes: *code-qa-patterns
allow_failure: true
- <<: *if-dot-com-gitlab-org-schedule
<<: *exists-ee
allow_failure: true
.review:rules:review-stop-failed-deployment:
rules:
- <<: *if-not-ee
when: never
- <<: *if-dot-com-gitlab-org-merge-request
<<: *exists-ee
changes: *code-qa-patterns
.review:rules:review-qa-smoke:
rules:
- <<: *if-not-ee
when: never
- <<: *if-dot-com-gitlab-org-merge-request
<<: *exists-ee
changes: *ci-review-patterns
- <<: *if-dot-com-gitlab-org-merge-request
<<: *exists-ee
changes: *frontend-patterns
allow_failure: true
- <<: *if-dot-com-gitlab-org-merge-request
<<: *exists-ee
changes: *code-qa-patterns
allow_failure: true
.review:rules:review-qa-all:
rules:
- <<: *if-not-ee
when: never
- <<: *if-dot-com-gitlab-org-merge-request
<<: *exists-ee
changes: *code-patterns
when: manual
allow_failure: true
- <<: *if-dot-com-gitlab-org-merge-request
<<: *exists-ee
changes: *qa-patterns
allow_failure: true
.review:rules:review-cleanup:
rules:
- <<: *if-not-ee
when: never
- <<: *if-dot-com-gitlab-org-merge-request
<<: *exists-ee
changes: *code-qa-patterns
when: manual
allow_failure: true
- <<: *if-dot-com-gitlab-org-schedule
<<: *exists-ee
allow_failure: true
.review:rules:review-stop:
rules:
- <<: *if-not-ee
when: never
- <<: *if-dot-com-gitlab-org-merge-request
<<: *exists-ee
changes: *code-qa-patterns
when: manual
allow_failure: true
- <<: *if-dot-com-gitlab-org-schedule
<<: *exists-ee
allow_failure: true
.review:rules:danger:
......@@ -1223,8 +1204,9 @@
.setup:rules:verify-tests-yml:
rules:
- <<: *if-not-ee
when: never
- <<: *if-default-refs
<<: *exists-ee
changes: *code-backstage-patterns
when: on_success
......@@ -1239,12 +1221,12 @@
.test-metadata:rules:update-tests-metadata:
rules:
- <<: *exists-ee
changes:
- <<: *if-not-ee
when: never
- changes:
- ".gitlab/ci/test-metadata.gitlab-ci.yml"
- "scripts/rspec_helpers.sh"
- <<: *if-dot-com-ee-schedule
<<: *exists-ee
###################
# workhorse rules #
......
......@@ -758,6 +758,7 @@ and included in `rules` definitions via [YAML anchors](../ci/yaml/README.md#anch
| `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-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-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`. | |
......@@ -787,16 +788,6 @@ and included in `rules` definitions via [YAML anchors](../ci/yaml/README.md#anch
<!-- 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 | 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