Commit 093874f4 authored by Albert Salim's avatar Albert Salim

Run full rspec jobs on automated MRs

To ensure the full rspec job is run on automated MRs,
there is a new rule `if-automated-merge-reqeust`
added in the rspec job rules prior to
the rule `if-merge-request-not-approved`.

The order of these two rules are important to ensure the job
is created in the pipeline, instead of `when: never` taking effect.

To ensure the minimal job is not run on automated MRs,
a reverse rule is added to the minimal job rules
using `if-automated-merge-request` with `when: never`.
parent bcc82c3a
......@@ -40,6 +40,9 @@
.if-merge-request-not-approved: &if-merge-request-not-approved
if: '$CI_MERGE_REQUEST_IID && $CI_MERGE_REQUEST_APPROVED != "true"'
.if-automated-merge-request: &if-automated-merge-request
if: '$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == "release-tools/update-gitaly" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME =~ /stable-ee$/'
.if-merge-request-title-as-if-foss: &if-merge-request-title-as-if-foss
if: '$CI_MERGE_REQUEST_TITLE =~ /RUN AS-IF-FOSS/'
......@@ -616,6 +619,8 @@
.rails:rules:ee-and-foss-migration:
rules:
- <<: *if-merge-request-title-run-all-rspec
- <<: *if-automated-merge-request
changes: *db-patterns
- <<: *if-merge-request-not-approved
when: never
- changes: *db-patterns
......@@ -624,6 +629,8 @@
rules:
- <<: *if-merge-request-approved
when: never
- <<: *if-automated-merge-request
when: never
- <<: *if-merge-request-title-run-all-rspec
when: never
- <<: *if-merge-request
......@@ -649,6 +656,8 @@
.rails:rules:ee-and-foss-unit:
rules:
- <<: *if-merge-request-title-run-all-rspec
- <<: *if-automated-merge-request
changes: *backend-patterns
- <<: *if-merge-request-not-approved
when: never
- changes: *backend-patterns
......@@ -657,6 +666,8 @@
rules:
- <<: *if-merge-request-approved
when: never
- <<: *if-automated-merge-request
when: never
- <<: *if-merge-request-title-run-all-rspec
when: never
- <<: *if-merge-request
......@@ -668,6 +679,8 @@
.rails:rules:ee-and-foss-integration:
rules:
- <<: *if-merge-request-title-run-all-rspec
- <<: *if-automated-merge-request
changes: *backend-patterns
- <<: *if-merge-request-not-approved
when: never
- changes: *backend-patterns
......@@ -676,6 +689,8 @@
rules:
- <<: *if-merge-request-approved
when: never
- <<: *if-automated-merge-request
when: never
- <<: *if-merge-request-title-run-all-rspec
when: never
- <<: *if-merge-request
......@@ -687,6 +702,8 @@
.rails:rules:ee-and-foss-system:
rules:
- <<: *if-merge-request-title-run-all-rspec
- <<: *if-automated-merge-request
changes: *code-backstage-patterns
- <<: *if-merge-request-not-approved
when: never
- changes: *code-backstage-patterns
......@@ -695,6 +712,8 @@
rules:
- <<: *if-merge-request-approved
when: never
- <<: *if-automated-merge-request
when: never
- <<: *if-merge-request-title-run-all-rspec
when: never
- <<: *if-merge-request
......@@ -706,6 +725,8 @@
.rails:rules:ee-and-foss-fast_spec_helper:
rules:
- <<: *if-merge-request-title-run-all-rspec
- <<: *if-automated-merge-request
changes: ["config/**/*"]
- <<: *if-merge-request-not-approved
when: never
- changes: ["config/**/*"]
......@@ -714,6 +735,8 @@
rules:
- <<: *if-merge-request-approved
when: never
- <<: *if-automated-merge-request
when: never
- <<: *if-merge-request-title-run-all-rspec
when: never
- <<: *if-merge-request
......@@ -732,6 +755,8 @@
- <<: *if-not-ee
when: never
- <<: *if-merge-request-title-run-all-rspec
- <<: *if-automated-merge-request
changes: *db-patterns
- <<: *if-merge-request-not-approved
when: never
- changes: *db-patterns
......@@ -742,6 +767,8 @@
when: never
- <<: *if-merge-request-approved
when: never
- <<: *if-automated-merge-request
when: never
- <<: *if-merge-request-title-run-all-rspec
when: never
- <<: *if-merge-request
......@@ -755,6 +782,8 @@
- <<: *if-not-ee
when: never
- <<: *if-merge-request-title-run-all-rspec
- <<: *if-automated-merge-request
changes: *backend-patterns
- <<: *if-merge-request-not-approved
when: never
- changes: *backend-patterns
......@@ -765,6 +794,8 @@
when: never
- <<: *if-merge-request-approved
when: never
- <<: *if-automated-merge-request
when: never
- <<: *if-merge-request-title-run-all-rspec
when: never
- <<: *if-merge-request
......@@ -778,6 +809,8 @@
- <<: *if-not-ee
when: never
- <<: *if-merge-request-title-run-all-rspec
- <<: *if-automated-merge-request
changes: *backend-patterns
- <<: *if-merge-request-not-approved
when: never
- changes: *backend-patterns
......@@ -788,6 +821,8 @@
when: never
- <<: *if-merge-request-approved
when: never
- <<: *if-automated-merge-request
when: never
- <<: *if-merge-request-title-run-all-rspec
when: never
- <<: *if-merge-request
......@@ -801,6 +836,8 @@
- <<: *if-not-ee
when: never
- <<: *if-merge-request-title-run-all-rspec
- <<: *if-automated-merge-request
changes: *code-backstage-patterns
- <<: *if-merge-request-not-approved
when: never
- changes: *code-backstage-patterns
......@@ -811,6 +848,8 @@
when: never
- <<: *if-merge-request-approved
when: never
- <<: *if-automated-merge-request
when: never
- <<: *if-merge-request-title-run-all-rspec
when: never
- <<: *if-merge-request
......@@ -824,6 +863,8 @@
- <<: *if-not-ee
when: never
- <<: *if-merge-request-title-run-all-rspec
- <<: *if-automated-merge-request
changes: *db-patterns
- <<: *if-merge-request-not-approved
when: never
- <<: *if-security-merge-request
......@@ -839,6 +880,8 @@
when: never
- <<: *if-merge-request-approved
when: never
- <<: *if-automated-merge-request
when: never
- <<: *if-merge-request
changes: *ci-patterns
when: never
......@@ -852,6 +895,8 @@
- <<: *if-not-ee
when: never
- <<: *if-merge-request-title-run-all-rspec
- <<: *if-automated-merge-request
changes: *backend-patterns
- <<: *if-merge-request-not-approved
when: never
- <<: *if-security-merge-request
......@@ -867,6 +912,8 @@
when: never
- <<: *if-merge-request-approved
when: never
- <<: *if-automated-merge-request
when: never
- <<: *if-merge-request
changes: *ci-patterns
when: never
......@@ -880,6 +927,8 @@
- <<: *if-not-ee
when: never
- <<: *if-merge-request-title-run-all-rspec
- <<: *if-automated-merge-request
changes: *backend-patterns
- <<: *if-merge-request-not-approved
when: never
- <<: *if-security-merge-request
......@@ -895,6 +944,8 @@
when: never
- <<: *if-merge-request-approved
when: never
- <<: *if-automated-merge-request
when: never
- <<: *if-merge-request
changes: *ci-patterns
when: never
......@@ -908,6 +959,8 @@
- <<: *if-not-ee
when: never
- <<: *if-merge-request-title-run-all-rspec
- <<: *if-automated-merge-request
changes: *code-backstage-patterns
- <<: *if-merge-request-not-approved
when: never
- <<: *if-security-merge-request
......@@ -923,6 +976,8 @@
when: never
- <<: *if-merge-request-approved
when: never
- <<: *if-automated-merge-request
when: never
- <<: *if-merge-request
changes: *ci-patterns
when: never
......
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