From bad9fec45e4101bbe8e2ba2b1bcf6b64ef2aecf1 Mon Sep 17 00:00:00 2001
From: Marcel Amirault <mamirault@gitlab.com>
Date: Thu, 25 Jul 2024 17:02:53 +0900
Subject: [PATCH] Add note about rules:exists with nested variables

---
 doc/ci/yaml/index.md | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/doc/ci/yaml/index.md b/doc/ci/yaml/index.md
index 9ed67ba79a658..19ff7857cdbf8 100644
--- a/doc/ci/yaml/index.md
+++ b/doc/ci/yaml/index.md
@@ -4321,8 +4321,11 @@ In this example:
 
 **Additional details**:
 
-- In some cases you cannot use `/` or `./` in a CI/CD variable with `exists`.
-  See [issue 386595](https://gitlab.com/gitlab-org/gitlab/-/issues/386595) for more details.
+- CI/CD variables used with `rules:exists` have some limitations:
+  - You cannot use [nested variables](../variables/where_variables_can_be_used.md#nested-variable-expansion)
+    with `exists`. See [issue 411344](https://gitlab.com/gitlab-org/gitlab/-/issues/411344) for more details.
+  - In some cases you cannot use `/` or `./` in a CI/CD variable with `exists`.
+    See [issue 386595](https://gitlab.com/gitlab-org/gitlab/-/issues/386595) for more details.
 - Glob patterns are interpreted with Ruby's [`File.fnmatch`](https://docs.ruby-lang.org/en/master/File.html#method-c-fnmatch)
   with the [flags](https://docs.ruby-lang.org/en/master/File/Constants.html#module-File::Constants-label-Filename+Globbing+Constants+-28File-3A-3AFNM_-2A-29)
   `File::FNM_PATHNAME | File::FNM_DOTMATCH | File::FNM_EXTGLOB`.
@@ -4335,7 +4338,6 @@ In this example:
     of globs. For example, a rule with 4 patterned globs has file limit of 2500.
 - A maximum of 50 patterns or file paths can be defined per `rules:exists` section.
 - `exists` resolves to `true` if any of the listed files are found (an `OR` operation).
-
 - With job-level `rules:exists`, GitLab searches for the files in the project and
   ref that runs the pipeline. When using [`include` with `rules:exists`](includes.md#include-with-rulesexists),
   GitLab searches for the files in the project and ref of the file that contains the `include`
-- 
GitLab