From c1b5795705ac91a2196a6df0bf577769af0131d5 Mon Sep 17 00:00:00 2001 From: TeNNoX Date: Tue, 28 Feb 2017 23:49:28 +0000 Subject: Add note about how to use or escape variables inside other variables --- doc/ci/variables/README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) 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:** -- cgit v1.2.3