It is not clear how to create a variable on a YAML pipeline and let it be changed at queue time.
There's no YAML example.
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Agreed cannot find the syntax either.
Below it says Quotes: "If you need a variable to be settable at queue time, then do not set it in the YAML file."
I am also interested to get answer for this question - ability to pass values for the variable at queue time. Is it possible, if yes then how?
When you do not define the variable in the variables section you can add it manually when triggering the build, but it won't be suggested as it was with builds configured by the 'old' designer.
You'll have to know the variable and type it right when setting it at queue time for a YAML build.
It wasn't obvious to me how to do it, but I finally figured it out. Click on the build pipeline, then click on the "Edit" button in upper right hand corner. Now, in upper right hand corner, next to "Run", click on the elipse. From there, you can manually define Triggers and Variables for that pipeline.
Have variable defined in the YAML, and it is also defined in the pipeline editor and marked as settable at queue time. When I set it at queue time it still resolves to the default value in the YAML.
Feels a bit clunky having to always manually input the variables. Wouldn't it be easier if there was a flag or something to mark the variables that can be set at queue time and this will display them just like in the old version?
Most helpful comment
Feels a bit clunky having to always manually input the variables. Wouldn't it be easier if there was a flag or something to mark the variables that can be set at queue time and this will display them just like in the old version?