Pipeline variables
What is pipeline variables?
Pipeline variables are working similarly to the environment variables in the pipeline execution. You can define the pipeline variables in the Variables section and use them in the pipeline steps.
To add a new pipeline variable, click New Variable on the revision edit page and define the variable name, description, and default value.
There are two types of pipeline variables:
- Input Variables: The variables that are injected into the pipeline steps.
- Output Variables: The variables that are generated from the pipeline steps.
Input Variables
For input variables, you can define the following options:
- Name: Name of the variable.
- Description: Description of the variable.
- Type: Either
String
orChoice
; For theChoice
type, you can define the choice options. Both options are treated as a string, but theChoice
type provides a dropdown menu in the pipeline execution. - Value: Default value of the variable.
Output Variables
For output variables, you can define the following options:
- Name: Name of the variable.
- Description: Description of the variable.
- Source: The source where the variable is generated. You can choose the either constant, pipeline step or input variable.
- Value: The value of the variable. If the source is a pipeline step, you can define the step reference and claim name.
The concept of output variable might sound confusing - Treat them as a way to pass the result of a pipeline to another pipeline.
For example, if you have a step that trains a model and you want to pass the model path to another step, you can define an output variable in the training step and use it in the next step.