The issue is you're declaring the variable at compile time. Try declaring it at runtime like this: $[variables.major]
Azure pipeline YAML: assign variable to another variable
I want to define variable version_ that consists of other my variables, like this:
but variables major, minor, versionCounter and branchPrefix aren't recognized, and this syntax is just transformed into string
I tried to use $(major) syntax, but it also didn't work.
How can I fix it?
2 answers
Sort by: Newest
-
-
KarishmaTiwari-MSFT 18,522 Reputation points Microsoft Employee
2021-07-31T00:11:47.487+00:00 The Azure DevOps team and community are active and answering questions on https://developercommunity.visualstudio.com/spaces/21/index.html
Please post your question there instead as Azure DevOps is currently not supported on Microsoft Q&A.
You can also ask for help here https://stackoverflow.com/questions/tagged/azure-devops.
Thanks