In TeamCity you can specify build parameters which can then be accessed by MSBuild. I currently use this feature to distinguish between deployment environment targets using a system parameter called DeployTo
. I thought this would be accessible through Fake.EnvironmentHelper
but when I print environVar "DeployTo"
there is nothing there. I have also tried listing environVars EnvironmentVariableTarget.Machine
but it is not listed there either.
I have tried passing it in as a command-line argument like so:
build.fsx Deploy --envvar DeployTo Test
or
build.fsx Deploy -ev DeployTo Test
However, instead of passing "Test", the environment variable is set to "true"
Is there any way to access a TeamCity build parameter from a FAKE build script?