I have defined a yaml file for a pipeline in Azure DevOps.
I want to define a variable named myVersion in Yaml which is structured as follows:
variables:
- name: myVersion
value: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
jobs:
- job: my_job
steps:
- script: echo '$(myVersion)'
The output is as follows:
'$(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)'
Unfortunately, this does not work because the values are not resolved.
How can I fix this?