summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Read <eread@gitlab.com>2019-06-18 03:45:22 +0000
committerEvan Read <eread@gitlab.com>2019-06-18 03:45:22 +0000
commit5c9acb69fed0419adb699d13b8941b68ffde4c0c (patch)
treedc7e9a3a99c7f874baf1b1c05f154d769aa87d58
parenta35195f4b84aa060f8e1e22bf85b6f798df38364 (diff)
parent5097cf4f78c2359c7eccd9b6e2d0adab12a3ace5 (diff)
downloadgitlab-ce-5c9acb69fed0419adb699d13b8941b68ffde4c0c.tar.gz
Merge branch 'docs/add-note-git-clone-path' into 'master'
Add note about nested variables for GIT_CLONE_PATH See merge request gitlab-org/gitlab-ce!29590
-rw-r--r--doc/ci/yaml/README.md18
1 files changed, 18 insertions, 0 deletions
diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md
index 4c170056a49..2759f1c5160 100644
--- a/doc/ci/yaml/README.md
+++ b/doc/ci/yaml/README.md
@@ -2620,6 +2620,24 @@ test:
- pwd
```
+### Nested paths
+
+The value of `GIT_CLONE_PATH` is expanded once and nesting variables
+within it is not supported.
+
+For example, you define both the variables below in your
+`.gitlab-ci.yml` file:
+
+```yml
+variables:
+ GOPATH: $CI_BUILDS_DIR/go
+ GIT_CLONE_PATH: $GOPATH/src/namespace/project
+```
+
+The value of `GIT_CLONE_PATH` is expanded once into
+`$CI_BUILDS_DIR/go/src/namespace/project`, and results in failure
+because `$CI_BUILDS_DIR` is not expanded.
+
## Special YAML features
It's possible to use special YAML features like anchors (`&`), aliases (`*`)