summaryrefslogtreecommitdiff
path: root/.gitlab/ci/rules.gitlab-ci.yml
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-04-21 12:21:08 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-04-21 12:21:08 +0000
commite7198b914bf1d6594909e35d3d00d0a0b260f250 (patch)
tree6fe636fedeae9c679839d5bf27dc091af037e765 /.gitlab/ci/rules.gitlab-ci.yml
parent3b80f22aba42e3e424de5c3dd15cc11f96aaac65 (diff)
downloadgitlab-ce-e7198b914bf1d6594909e35d3d00d0a0b260f250.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to '.gitlab/ci/rules.gitlab-ci.yml')
-rw-r--r--.gitlab/ci/rules.gitlab-ci.yml27
1 files changed, 27 insertions, 0 deletions
diff --git a/.gitlab/ci/rules.gitlab-ci.yml b/.gitlab/ci/rules.gitlab-ci.yml
index 13189f88124..d10803f025a 100644
--- a/.gitlab/ci/rules.gitlab-ci.yml
+++ b/.gitlab/ci/rules.gitlab-ci.yml
@@ -2392,6 +2392,33 @@
changes: *feature-flag-development-config-patterns
# This rule should share the same logic with .as-if-jh:rules:prepare-as-if-jh
+# in additionally that there are changes in dependency-patterns
+# Unfortunately, we can't say it has changes in
+# feature-flag-development-config-patterns
+# And in
+# dependency-patterns
+# At the same time. Note that this can't be using OR so using a union pattern
+# doesn't work either. Given that we cannot specify this, there's a gap can
+# happen when:
+# * The merge request does not have ~"pipeline:run-as-if-jh"
+# * The merge request changes a feature flag
+# * The merge request also changes dependencies
+# In this case, we expect that we do run `sync-as-if-jh-branch` but it won't,
+# meaning that dependencies in the JH validation pipeline will be outdated.
+# To work around this issue, apply ~"pipeline:run-as-if-jh" to the merge
+# request so we can force it to run `sync-as-if-jh-branch` when there are
+# dependencies changes.
+.as-if-jh:rules:sync-as-if-jh:
+ rules:
+ - !reference [".strict-ee-only-rules", rules]
+ - !reference [".as-if-jh-default-exclusion-rules", rules]
+ - <<: *if-merge-request-labels-as-if-jh
+ changes: *dependency-patterns
+ # Ideally, we should be able to do this:
+ # - <<: *if-dot-com-gitlab-org-merge-request
+ # changes: *feature-flag-development-config-patterns && *dependency-patterns
+
+# This rule should share the same logic with .as-if-jh:rules:prepare-as-if-jh
# Because the jobs using this need jobs using the preparation rules
.as-if-jh:rules:start-as-if-jh:
rules: