Environment variables
Environment variables are dynamic-named values that can be referenced inside of jobs.
Redacted uses two types of environment variables:
- Global: available for all projects on the platform
- Project: available only for the project in which it is created
NOTE: Environment variables are not shared between platforms.
Name
Names are always required. There are some restrictions when naming environment variables:
- The name of your variable cannot exceed 255 characters.
- The name can only contain:
- uppercase letters (A-Z)
- lowercase letters (a-z)
- numbers (0-9)
- underscores (_)
- hyphens (-)
- periods (.)
Description
Descriptions are optional. There are no restrictions on descriptions, though it's good practice to keep them short and informative.
Global variables
Access all global environment variables for the platform from the library page (link removed).
- Verify your location to make sure you're accessing global environment variables.
- You should see the data management menu for all projects.
- Environment variables should be in the only options in the settings menu.
- Additionally, you can use the breadcrumbs to verify your location. When working with global environment variables, you should only see the breadcrumb Projects.
- In the top bar, you'll see when the list of variables was last updated, as well as a button to create a new global variable.
- Search for global environment variables by name only.
- The list of global environment variables includes the name and description of the variable, as well as a icon you can select to copy the variable. There is also a badge indicating that each variable is global.
NOTE: On the global environment variables menu, you can only view global environment variables. You can also create and edit them.
Project variables
Access your project's environment variables from the overview page (link removed).
You can create environment variables inside of a project. These will only be accessible within that project; other projects will not be able to access them.
- Verify your location to make sure you're accessing project environment variables.
- You should see links to jobs, pipelines, and apps in the data management menu.
- In settings menu, you'll see environment variables and Docker credentials.
- Additionally, you can use the breadcrumbs to verify your location. When working with project environment variables, you should see Projects followed by your project.
- In the top bar, you'll see:
- when the list of variables was last updated,
- access to the project settings, and
- a button to create a new project variable.
- Search for project environment variables by name only.
- The list of environment variables inside of the project includes the name and description of the variable, as well as a icon you can select to copy the variable. There is also a badge indicating whether the variable is global or project.
You can view both global and project environment variables within a project, but you can only create or edit project variables.
There is also the option to override global environment variables within a project.
View and edit variables
To view the details for an environment variable, select it. Doing so will open a panel with the variable's details.
This is where you can edit a variable's name, description, and value.
IMPORTANT: You can only edit global variables from the project library page, and you can only edit project variables from the project overview page.
When you open the details for a global variable from the project environment variables list, you will see the option to override the variable for the current project only.