diff options
author | TeNNoX <tennox@posteo.de> | 2017-02-28 23:49:28 +0000 |
---|---|---|
committer | TeNNoX <tennox@posteo.de> | 2017-02-28 23:49:28 +0000 |
commit | c1b5795705ac91a2196a6df0bf577769af0131d5 (patch) | |
tree | 118f6ea7c691b72ef791cb0f8add0a08a6c33078 /doc/ci | |
parent | b2d5869e08f9f4a790b61f53007b3ff0a467ebc9 (diff) | |
download | gitlab-ce-c1b5795705ac91a2196a6df0bf577769af0131d5.tar.gz |
Add note about how to use or escape variables inside other variables
Diffstat (limited to 'doc/ci')
-rw-r--r-- | doc/ci/variables/README.md | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/ci/variables/README.md b/doc/ci/variables/README.md index 620d4744685..04c0af44237 100644 --- a/doc/ci/variables/README.md +++ b/doc/ci/variables/README.md @@ -131,6 +131,16 @@ job_name: variables: [] ``` +You are able to use other variables inside your variable definition (or escape them with `$$`): + +```yaml +variables: + LS_CMD: 'ls $FLAGS $$TMP_DIR' + FLAGS: '-al' +script: + - 'eval $LS_CMD' # will execute 'ls -al $TMP_DIR' +``` + ## Secret variables >**Notes:** |