Skip to main content

Define variables

Introduction

Define variables action is used to define variables in the context of the current blueprint. The variables defined in this action will be available and can be used only in other actions within this blueprint.

Unlike environment variables, variables defined using this action won't share its values at the OS level.

Each variable has a name and a value that should be defined in the settings.

Settings

From the settings window we can add declare variables manually or from a file.

Manually

This is the default way. A Name and a Value are needed to define the variable. You can also click on the Add new variable button in order to add more than one variables.

From file

This is the alternative way to declare variables. A a dotenv file with the variables definition is required, for instance:

variable1=value1
variable2=value2
variable3=value3

Once the file has been created and the environment variables have been declared inside it, its path (absolute or relative to CLI's directory) should be used in the settings. Once this action has been reached by the execution flow, the CLI will read the file and declare all variables.

Accessing variables from the blueprint

In order to access a variable from within the blueprint itself, you need to enclose the variable's name between double brackets:

{{ variable1 }}

If you'd like to expose variables to external scripts, we recommend you to have a look at the Accessing variables from scripts article.