How to use /output buildserver
in GitLab CI
#4164
Replies: 2 comments 1 reply
-
The variables are getting written to Example:
You could then use those three variables in the next steps. |
Beta Was this translation helpful? Give feedback.
-
Which kind of defeats the purpose of the |
Beta Was this translation helpful? Give feedback.
-
The doco says that it will "write out the variables to whatever build server it is running in".
For GitLab CI with PowerShell, I thought I would be able to access the variables either like
$GitVersion_SemVer
or as an environment variable like$env:GitVersion_SemVer
.However, neither of those work. When I print all environment variables with
dir env:
I don't see any of the GitVersion ones.I am running the CI stage in a docker image, and that image has GitVersion installed using choco. Since I found that variables are not preserved from one stage to another, I had to run GitVersion in the same stage as it is used. e.g.:
Any idea why that still isn't working?
Beta Was this translation helpful? Give feedback.
All reactions