Variable Usage Examples
This topic provides examples of how to create and use global, folder, and release variables in Digital.ai Release. Variables let you define dynamic values that can be reused across tasks, templates, and releases. This makes your release process more flexible, consistent, and easier to maintain.
Overview of Variable Types
Digital.ai Release supports three types of variables:
- Global variables: Available across all templates and releases.
- Folder variables: Available to all templates and releases within a folder.
- Release variables: Scoped to a specific release or template.
For more information, see Variables in Release.
Comparison Table: Variable Types, Scope, and Syntax
Feature | Global Variable | Folder Variable | Release Variable |
---|---|---|---|
Scope | Entire system | All templates/releases in a folder | Only one release or template |
Where to define | CONFIGURATION > Global variables | Overview > Folders > Variables | CONFIGURATION > Variables tab in a release |
Permission needed | Edit Global Variables | Edit Folder Variables | Edit Template/Release |
Syntax | ${global.varName} | ${folder.varName} | ${varName} |
Use case examples | Base URLs, credentials | Folder-specific ownership, team info | Version numbers, release-specific data |
Global Variables
Global variables are useful for system-wide configurations such as environment URLs, credentials, or shared constants.
Example: Creating a Global Variable
To create a global variable (requires Edit Global Variables
permission):
- Go to the CONFIGURATION tab and select Global variables.
- Click New global variable.
- Enter the Variable name, such as
website
, and the Value, for examplehttps://digital.ai
. - Click Create to save the variable.
Using a Global Variable
You can use the variable in any template or release by referencing it as ${global.website}
.
Example: A task title:
Visit ${global.website}
Release resolves the value at runtime wherever this variable is used.
For more details, see Global Variables.
Folder Variables
Folder variables are ideal when templates or releases in the same folder need shared values.
Example: Creating a Folder Variable
To create a folder variable (requires Edit folder variables
permission):
- In the Overview tab, select Folders.
- Choose a folder.
- Under the CONFIGURATION tab, select Variables.
- Click New folder variable.
- Enter the Variable name, such as
folderOwner
, and Value, such asQA Team
. - Click Create to save the variable.
Using a Folder Variable
You can use this variable in any release or template within the folder using ${folder.folderOwner}
.
Example: A task title:
Contact ${folder.folderOwner}
The system resolves the value automatically during execution.
For more details, see Folder Variables.
Release Variables
Release variables offer the most flexibility. Use them for values that change between releases (e.g., version numbers, build identifiers, or release notes).
Example: Creating a Release Variable
To create a release variable:
- Open the target release or template.
- Under the CONFIGURATION tab, select Variables.
- Click New variable.
- Enter the Variable name, such as
releaseVersion
, and Value, such as25.3.0
. - Click Create.
You can also define release variables inline while editing a task by using ${releaseVersion}
.
Using a Release Variable
This variable is scoped to a single release or template and is used with ${releaseVersion}
.
Example: A task title:
Current Version: ${releaseVersion}
Release replaces the placeholder with the actual value during execution.
For more details, see Release Variables.