-
Hi, is there a way to read the env variables from within the template. Release notes for $env:GITVERSION_SEMVERBuild Number: {{buildDetails.id}} Perhaps process.env.env:GITVERSION_SEMVER ? Thanks. |
Beta Was this translation helpful? Give feedback.
Answered by
rfennell
Mar 18, 2021
Replies: 1 comment 4 replies
-
No there is way to read environmental variables on the template. However, if it is semver you want why not set the build name using the GitVersion tasks. This is the way I do it, I use the following at the top of my build
And then can use this in the templates as
|
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
mlop3s
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No there is way to read environmental variables on the template. However, if it is semver you want why not set the build name using the GitVersion tasks.
This is the way I do it, I use the following at the top of my build
name: $(Build.DefinitionName)_$(GitVersion.FullSemVer)
And then can use this in the templates as
Build {{buildDetails.buildNumber}}