referenced here already: How to access an artifact's BUILDNUMBER is Visual Studio Team Services Release management and here: https://learn.microsoft.com/en-us/vsts/build-release/concepts/definitions/release/variables?tabs=batch
I am using vanilla Visual Studio Team Foundation Server 2015 (Version 14.102.25423.0) In my build I zip up an artifact with the buildnumber of the artifact. eg. 20171004.16.zip I have two artifact sources defined in my release definition.
"QA - myproject - build"
"Prod - myproject - build"
One of my steps is to copy the buildnumber.zip file to my remote server. in my configuration setting I have defined:
ProdBuildNumber = $(Release.Artifacts.Prod - myproject - build.BuildNumber)
The issue is that ProdBuildNumber just keeps getting set as that literally. eg: from debug script:
...
2017-10-05T19:09:48.0651172Z [SYSTEM] --> [release]
2017-10-05T19:09:48.0651172Z [PRODBUILDNUMBER] --> [$(Release.Artifacts.Prod - myproject - build.BuildNumber)]
2017-10-05T19:09:48.0651172Z [RELEASE_RELEASEID] --> [114]
...
Can anyone see what I am doing incorrectly? Willing to try any ideas.