Post

A friendly reminder that variable syntax in #AzureDevOps isn't important until it is. Which is all the time. Refresh your knowledge today so you don't end up like *someone* I know who was fixing a pipeline template bug at 1 am... It's me, hi! I'm the idiot, it's me... #DevOps #MVPBuzz #PowerShell

learn.microsoft.comDefine variables - Azure PipelinesVariables are name-value pairs defined by you for use in a pipeline. You can use variables as inputs to tasks and in your scripts.

0 reposts4 likes

Also, whilst troubleshooting complex pipeline templates that compile differently based on variable / parameter values, never forget that the "Download full YAML" option exists. It performs the "compile" step for you, allowing you to debug without actually committing changes or running the pipeline.

For those who don't like clicking links - expression variables ${{ variables.var }} process at compile, BEFORE runtime - macro syntax $(var) process at runtime BEFORE tasks - runtime expressions $[variables.var] also process at runtime BEFORE tasks but are meant for conditional expressions.