I need to access the build number of the artifact within Visual Studio Team Services Release Management, so that I can send the value to a Task.
My artifact name has a space in it: "Production Branch"
I have been reading the following documentation.
The documentation states that it can be accessed like this:
RELEASE_ARTIFACTS_[source-alias]_[variable-name]
e.g.
RELEASE_ARTIFACTS_Production Branch_BUILDNUMBER
It goes on to say that if being used to pass an Argument to a task, replace the underscore with a period so:
RELEASE.ARTIFACTS.Production Branch.BUILDNUMBER
However this results in the following error:
2017-02-02T12:15:49.6988066Z ##[error]The term 'Release.Artifacts.Production_Branch.BUILDNUMBER' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
This could be due to the artifact name containing a space character and I am unsure of how to handle this.