All Products
Search
Document Center

Alibaba Cloud DevOps:Common variable groups

Last Updated:Mar 27, 2025

Alibaba Cloud DevOps allows you to create and manage common variable groups in organizations. This helps you manage and configure global variables in a unified manner. You can associate pipelines with common variable groups to use the variables in the groups and make the variables effective for specific pipeline jobs.

Manage common variable groups

Create a common variable group

Go to the Flow page, and choose Global Settings > Common Variable Group. On the right side of the Common Variable Group page, click Create Variable Group.

In the Create Common Variable Group dialog box, configure the Variable Group Name, Description, Variable Name, and Default Value parameters, and click Create. By default, the Variable Group ID parameter is automatically generated.

莫小@1x (12)

Note
  • Private Mode determines whether the variable is publicly visible. If you turn on the Private Mode switch for a variable, other users cannot view the value of the variable.

  • To ensure the security of secret keys, the values of variables for which Private Mode is enabled cannot be displayed.

Edit a common variable group

Go to the Flow page, and choose Global Settings > Common Variable Group. On the right side of the group that you want to manage, click Edit Variable Group.

莫小@1x (14)

Delete a global variable group

Go to the Flow page, and choose Global Settings > Common Variable Group. On the right side of the group that you want to manage, click Delete Variable Group.

Note

If you delete a variable group that is associated with a pipeline, an error may occur when the pipeline is run. Exercise caution when you delete a variable group.

Use a common variable group

You can configure multiple custom variables for a common variable group. The variable group can be referenced in different stages of pipelines and the variables can be dynamically used when pipeline jobs are run. This feature is suitable for the multi-condition variable referencing scenarios.

Use a common variable group in pipelines

  1. Create a common variable group and configure multiple variables.莫小@1x (16)

  2. Click Associate Variable Group on the Common Variable Group page of the pipeline that you want to manage.高的 (35)

  3. Add the job for obtaining the common variable group in the required stage of the pipeline, or directly add the variables in the ${variable name} format in code editor of the pipeline job.

    高的 (30)

  4. View the variables that you configured in the specific pipeline stage.高的 (34)