diff options
author | Steve Azzopardi <sazzopardi@gitlab.com> | 2019-06-13 09:05:37 +0200 |
---|---|---|
committer | Steve Azzopardi <sazzopardi@gitlab.com> | 2019-06-17 10:20:51 +0200 |
commit | 32571dfb32f31ba29eadd7ed443e9ea588838725 (patch) | |
tree | 41fab8b45756a416a8ef41e2ccd686a4063de9e7 | |
parent | 5eff8dd1e7a9a51349953124a5eca069b866f6c7 (diff) | |
download | gitlab-ce-docs/add-note-git-clone-path.tar.gz |
Add note about nested variables for GIT_CLONE_PATHdocs/add-note-git-clone-path
The variable $GIT_CLONE_PATH does not support nested variables, it will
only expand the variables once, not more.
reference https://gitlab.com/gitlab-org/gitlab-runner/issues/4319
-rw-r--r-- | doc/ci/yaml/README.md | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md index 4c170056a49..e688b612fbd 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 (`*`) |