This topic describes how to configure and use environment variables.
Configure job parameters. If a parameter belongs to multiple jobs, you can extract this parameter as an environment variable. Environment variables can be imported and exported.
The roles that can configure workspace environment variables in the simple and enterprise mode are as follows:
Simple mode: Both developers and administrators can create and edit environment variables in a workspace. This mode does not distinguish the development environment from the production environment. Developers can modify environment variables.
Enterprise mode: Only administrators can create or edit environment variables in a workspace.
This function is available only if the OBS service is available. If OBS is unavailable, variables can be imported from the local PC.

The difference between a variable and a constant lies in whether their values need to be reconfigured when they are imported to another workspace or project.

Parameter |
Mandatory |
Description |
|---|---|---|
Parameter |
Yes |
The parameter name must be unique, consist of 1 to 64 characters, and contain only letters, digits, underscores (_), and hyphens (-). The parameter name must be in the format set in Configuring Script Variables. For example, if the format set in the script variable definition is ${dlf.}, the parameter name must be set to dlf.xxx. |
Value |
Yes |
Parameter values support constants and EL expressions but do not support system functions. For example, 123 and abc are supported. If the parameter value is a string, add double quotation marks (""), for example, "05". For details about how to use EL expressions, see Expression Overview. |
Description |
No |
Parameter description |
You can add, modify, delete, and reset environment variables.
next to the text box to edit the EL expression. Click Save. After an environment variable is modified, Modify is displayed for it.The configured environment variables can be used in either of the following ways:
Context:
