Variables

Just like classic build pipelines, YAML pipelines support the use of variables. Variables can be defined at every level of a YAML pipeline (except for within a task) using the following syntax:

variables:
name: value
anotherName: otherValue

Variables can later be retrieved using the syntax that you already know from classic build pipelines—$(name) and $(anotherName).

It is also possible to reference existing variable groups from within a YAML pipeline. This is done by using the group keyword, instead of specifying the name of a variable. To also retrieve all the variables from a variable group called myVariableGroup, you would extend the preceding YAML, as follows:

variables:
name: value
anotherName: otherValue
group: myVariableGroup

Variables can be set at every level in a YAML pipeline, but only variables set at the root level can be overridden when queuing a new execution manually.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.217.6.114