Skip to content

Commit

Permalink
Merge pull request #377 from buildkite-plugins/toote-expand-vars-clar…
Browse files Browse the repository at this point in the history
…ification

Add clarifications on volume variables
  • Loading branch information
pzeballos authored Mar 9, 2023
2 parents cca864b + eff1b63 commit 892994b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ steps:
- "./dist:/app/dist"
```

If you want to use environment variables in the `volumes` element, you will need to activate the (unsafe) option `expand-volume-vars`.
If you want to use environment variables in the `volumes` element, you will need to activate the (unsafe) option `expand-volume-vars` (and most likely escape it using `$$VARIABLE_NAME`).

## Environment

Expand Down Expand Up @@ -548,6 +548,8 @@ When set to true, it will activate interpolation of variables in the elements of

:warning: **Important:** this is considered an unsafe option as the most compatible way to achieve this is to run the strings through `eval` which could lead to arbitrary code execution or information leaking if you don't have complete control of the pipeline

Note that rules regarding [environment variable interpolation](https://buildkite.com/docs/pipelines/environment-variables#runtime-variable-interpolation) apply here. That means that `$VARIABLE_NAME` is resolved at pipeline upload time, whereas `$$VARIABLE_NAME` will be at run time. All things being equal, you likely want to use `$$VARIABLE_NAME` on the variables mentioned in this option.

### `graceful-shutdown` (optional, run only)

Gracefully shuts down all containers via 'docker-compose stop`.
Expand Down

0 comments on commit 892994b

Please sign in to comment.