diff --git a/.gitlab/ci/artifact-collector/as-if-foss-dummy.gitlab-ci.yml b/.gitlab/ci/artifact-collector/as-if-foss-dummy.gitlab-ci.yml
new file mode 100644
index 0000000000000000000000000000000000000000..2c0e116186309d6f6f740d6d8a9df6cf3c7db1ba
--- /dev/null
+++ b/.gitlab/ci/artifact-collector/as-if-foss-dummy.gitlab-ci.yml
@@ -0,0 +1,5 @@
+rspec:artifact-collector as-if-foss:
+  rules:
+    - when: never
+  script:
+    - echo OK
diff --git a/.gitlab/ci/artifact-collector/as-if-foss.gitlab-ci.yml b/.gitlab/ci/artifact-collector/as-if-foss.gitlab-ci.yml
new file mode 100644
index 0000000000000000000000000000000000000000..b0078bd2d9eee46b2c58170e6fe5c4c89c88ac28
--- /dev/null
+++ b/.gitlab/ci/artifact-collector/as-if-foss.gitlab-ci.yml
@@ -0,0 +1,19 @@
+rspec:artifact-collector as-if-foss:
+  extends:
+    - .artifact-collector
+    - .as-if-foss:rules:start-as-if-foss
+  needs:
+    # We need to wait for `start-as-if-foss` because cross project needs
+    # will not wait, and it'll simply look at the latest pipeline regardless
+    # status. This means we need to wait for the whole FOSS pipeline before
+    # trying to fetch the artifacts from there, ensuring they're available.
+    - job: start-as-if-foss
+    - project: gitlab-org/gitlab-foss
+      ref: as-if-foss/${CI_COMMIT_REF_NAME}
+      job: rspec:artifact-collector unit
+    - project: gitlab-org/gitlab-foss
+      ref: as-if-foss/${CI_COMMIT_REF_NAME}
+      job: rspec:artifact-collector system
+    - project: gitlab-org/gitlab-foss
+      ref: as-if-foss/${CI_COMMIT_REF_NAME}
+      job: rspec:artifact-collector remainder
diff --git a/.gitlab/ci/rails.gitlab-ci.yml b/.gitlab/ci/rails.gitlab-ci.yml
index 09ce8f8d0f9db50c0e75ad41d0851d63d6d2dc9e..644ee63f57ba7cc4d894e2ed763c0a370f1e9ef7 100644
--- a/.gitlab/ci/rails.gitlab-ci.yml
+++ b/.gitlab/ci/rails.gitlab-ci.yml
@@ -1,5 +1,11 @@
 include:
   - local: .gitlab/ci/rails/shared.gitlab-ci.yml
+  - local: .gitlab/ci/artifact-collector/as-if-foss.gitlab-ci.yml
+    rules:
+      - if: '$GITLAB_FEATURES =~ /\bcross_project_pipelines\b/'
+  - local: .gitlab/ci/artifact-collector/as-if-foss-dummy.gitlab-ci.yml
+    rules:
+      - if: '$GITLAB_FEATURES !~ /\bcross_project_pipelines\b/'
 
 ###############################################################
 # EE/FOSS: default refs (MRs, default branch, schedules) jobs #
@@ -358,26 +364,6 @@ rspec:artifact-collector unit:
     - job: rspec unit clickhouse  # 1 job
       optional: true
 
-rspec:artifact-collector as-if-foss:
-  extends:
-    - .artifact-collector
-    - .as-if-foss:rules:start-as-if-foss
-  needs:
-    # We need to wait for `start-as-if-foss` because cross project needs
-    # will not wait, and it'll simply look at the latest pipeline regardless
-    # status. This means we need to wait for the whole FOSS pipeline before
-    # trying to fetch the artifacts from there, ensuring they're available.
-    - job: start-as-if-foss
-    - project: gitlab-org/gitlab-foss
-      ref: as-if-foss/${CI_COMMIT_REF_NAME}
-      job: rspec:artifact-collector unit
-    - project: gitlab-org/gitlab-foss
-      ref: as-if-foss/${CI_COMMIT_REF_NAME}
-      job: rspec:artifact-collector system
-    - project: gitlab-org/gitlab-foss
-      ref: as-if-foss/${CI_COMMIT_REF_NAME}
-      job: rspec:artifact-collector remainder
-
 rspec:artifact-collector system:
   extends:
     - .artifact-collector