You can use variables to help define other variables. Use `$$` to ignore a variable
name inside another variable:
Use the [`value` and `description`](../yaml/index.md#prefill-variables-in-manual-pipelines)
keywords to define [variables that are prefilled](../pipelines/index.md#prefill-variables-in-manual-pipelines)
for [manually-triggered pipelines](../pipelines/index.md#run-a-pipeline-manually).
### Use variables or `$` in other variables
You can use variables inside other variables:
```yaml
variables:
job:
variables:
FLAGS:'-al'
LS_CMD:'ls"$FLAGS"'
script:
-'eval"$LS_CMD"'# Executes 'ls -al'
```
If you do not want the `$` interpreted as the start of a variable, use `$$` instead:
```yaml
job:
variables:
FLAGS:'-al'
LS_CMD:'ls"$FLAGS"$$TMP_DIR'
script:
script:
-'eval"$LS_CMD"'# Executes 'ls -al $TMP_DIR'
```
Use the [`value` and `description`](../yaml/index.md#prefill-variables-in-manual-pipelines)
keywords to define [variables that are prefilled](../pipelines/index.md#prefill-variables-in-manual-pipelines)
for [manually-triggered pipelines](../pipelines/index.md#run-a-pipeline-manually).
### Add a CI/CD variable to a project
You can add CI/CD variables to a project's settings. Only project members with the
...
...
@@ -374,26 +387,6 @@ WARNING:
When you store credentials, there are [security implications](#cicd-variable-security).
If you use AWS keys for example, follow the [Best practices for managing AWS access keys](https://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html).