You are looking at the docs for an older version (v0.8.5). The latest version is main.
Task Environment Variables
The environment
attribute can be used to define environment variables that should be set before a task runs.
Syntax
Do this by adding an env:
or environment:
between the task name and the script.
## Tasks
### Task1
Env: ENVIRONMENT=PRODUCTION
```
echo $ENVIRONMENT
```
Multiple environment variables
You can define multiple environment variables.
## Tasks
### Task1
Env: ENVIRONMENT=PRODUCTION
Env: VERSION=1.2
```
echo $ENVIRONMENT
echo $VERSION
```
or
## Tasks
### Task1
Env: ENVIRONMENT=PRODUCTION, VERSION=1.2
```
echo $ENVIRONMENT
echo $VERSION
```