Variables for Universal Connector
Types of variables
This section describes the following types of variables:
- Azure DevOps variable group and pipeline variables
- GitHub Actions Variable, Secrets, and Workflow variable
- Internal application variables
- Plug-in file-based variables
Azure DevOps variable group and pipeline variables
These variables are in VARIABLE format. The variable name is in all caps.
BMC AMI DevOps replaces these variables with the default or user-defined value of the corresponding variable name.
To create variable group variables:
- On the Azure DevOps dashboard, click Pipelines to expand it.
- Click Library.
- Click +Variable group.
- Enter the variable group name.
- (Optional) Enter a description.
- Click +Add.
Enter a variable name.
Enter a variable value.
- Click Save.
To create pipeline variables:
- On the Azure DevOps dashboard, click Pipelines to expand it.
- On the Pipelines tab, click All to show a list of all the pipelines.
- Select a pipeline to open a list of all runs for the specified pipeline.
- On the Runs tab, click Edit in the upper right-hand corner to edit the pipeline before running.
- Click Variables in the upper right-hand corner.
- In the Variables dialog box, click +Add.
- In the New variable dialog box, enter the variable name.
Enter a variable value.
- Click OK.
- Click Save.
GitHub Actions Variable, Secrets, and Workflow variable
These variables are in VARIABLE format. The variable name is in all caps.
BMC AMI DevOps replaces these variables with the default or user-defined value of the corresponding variable name.
The utilization of secrets and variables is useful if you want to reuse the same property values in multiple workflows or change the property value frequently.
To create variables for use with multiple workflows:
- In your GitHub repository, select Settings.
- Under Security, expand Secrets and Variables.
- Select Actions.
- Select the Variables tab and click New repository variable.
- Enter the variable name and value, and click Add variable.
To create secrets for use with multiple workflows:
- In your GitHub repository, select Settings.
- Under Security, expand Secrets and Variables.
- Select Actions.
- Select the Secrets tab and click New repository secret.
- Enter the secret variable name and value, and click Add secret.
To create environment variables for a single workflow:
- In your workflow scripts, define the key: env:.
Under env:, define variableName: value.
Internal application variables
These variables are in ${variable} format.
BMC AMI DevOps replaces these variables with the value of the corresponding fields. They are for internal application use only. Do not alter them.
Plug-in file-based variables
These variables are in $[variable] format.
BMC AMI DevOps replaces these variables with the value of the corresponding variable in the plug-in variables file (default file name: AMI_DevOps.properties).