diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 7302d5c02af34ed29a982064dc4a1f528dd80978..aa9c228648dd521ad5ad8d9c17097f43cb8c8df3 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -90,8 +90,7 @@ workflow:
     # For the scheduled pipelines, we set specific variables.
     - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "schedule"'
       variables:
-        <<: *default-ruby-variables
-        <<: *default-branch-pipeline-failure-variables
+        <<: [*default-ruby-variables, *default-branch-pipeline-failure-variables]
         CRYSTALBALL: "true"
         PIPELINE_NAME: 'Scheduled Ruby $RUBY_VERSION $CI_COMMIT_BRANCH branch pipeline'
     # Run pipelines for ruby3_1 branch
@@ -103,15 +102,13 @@ workflow:
     # when pipeline is triggered by a project access token.
     - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $GITLAB_USER_LOGIN =~ /project_\d+_bot\d*/'
       variables:
-        <<: *default-ruby-variables
-        <<: *default-branch-pipeline-failure-variables
+        <<: [*default-ruby-variables, *default-branch-pipeline-failure-variables]
         GITLAB_DEPENDENCY_PROXY_ADDRESS: ""
         PIPELINE_NAME: 'Ruby $RUBY_VERSION $CI_COMMIT_BRANCH branch pipeline (triggered by a project token)'
     # For `$CI_DEFAULT_BRANCH` branch, create a pipeline (this includes on schedules, pushes, merges, etc.).
     - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
       variables:
-        <<: *default-ruby-variables
-        <<: *default-branch-pipeline-failure-variables
+        <<: [*default-ruby-variables, *default-branch-pipeline-failure-variables]
         PIPELINE_NAME: 'Ruby $RUBY_VERSION $CI_COMMIT_BRANCH branch pipeline'
     # For tags, create a pipeline.
     - if: '$CI_COMMIT_TAG'
diff --git a/.gitlab/ci/rules.gitlab-ci.yml b/.gitlab/ci/rules.gitlab-ci.yml
index 53362c57f6e49f18e71019e26c87c21da9f64fd0..d8cc67a966a21209499dce5b164014a33e4d35eb 100644
--- a/.gitlab/ci/rules.gitlab-ci.yml
+++ b/.gitlab/ci/rules.gitlab-ci.yml
@@ -1625,14 +1625,12 @@
 
 .qa:rules:package-and-test-schedule:
   rules:
-    - <<: *if-dot-com-gitlab-org-schedule
+    - <<: [*if-dot-com-gitlab-org-schedule, *qa-e2e-test-schedule-variables]
       allow_failure: true
-      <<: *qa-e2e-test-schedule-variables
 
 .qa:rules:e2e-schedule-blocking:
   rules:
-    - <<: *if-dot-com-gitlab-org-schedule
-      <<: *qa-e2e-test-schedule-variables
+    - <<: [*if-dot-com-gitlab-org-schedule, *qa-e2e-test-schedule-variables]
 
 # Note: If any changes are made to this rule, the following should also be updated:
 # 1) .qa:rules:manual-omnibus-and-follow-up-e2e