From the course: Azure DevOps: Continuous Delivery with YAML Pipelines

Unlock the full course today

Join today to access over 22,700 courses taught by industry experts or purchase this course individually.

Variables and scope

Variables and scope - Azure Tutorial

From the course: Azure DevOps: Continuous Delivery with YAML Pipelines

Start my 1-month free trial

Variables and scope

- [Instructor] Variables are used to allow pipelines to run against different environments. Understanding how the scope works and how to use variables is critical to success with Azure pipelines. Variables are stored as strings that are mutable and what that means is that they can be changed as we run the pipeline. They can be created at different levels and they'll have the scope of where they were declared. For example, that means that a stage variable can be used in a job but not the other way around. We can specify variables using any combination of letters, numbers, the period and underscore characters. There's also the system variables, which are read-only and include information about the pipeline, and then there are the pipeline variables. These are specified in the portal when we go out and define the pipeline. A unique thing about these is that they can be declared as a secret, which allows us to encrypt and…

Contents