Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.
If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!
How do I access Windows environment variables within BuildMaster
-
I have some files that need to get copied to the Windows OS folder and then also register a DLL there. How can I use Windows environment variables instead of having to create new variables?
Product: BuildMaster
Version: 4.9.2
-
Simply use a PowerShell script in your deployment plan to do the copy, and access them using:
$env:EnvironmentVariableName
-
Yeah I knew about that option. Just wanting to use the built in functions. Copying was just the simple one but there are a few others that it would be nice to be able to use them with as well.
Won't 5.0 have a way to access them? I seem to recall a way to do it, it might have been using PS to get the value and pass it back into BuildMaster but at least you could use it elsewhere in the deployment if needed rather than having to re-write functions whenever you wish to utilize one.
Grant it this may be a rare need, just an old app to support here.Thanks!
-
Yes, in the new/v5 execution engine, we wrote a variable function called
$EnvironmentVariable(name)
that returns the machine environment variable.The current/v4 execution engine does not provide agent/server context in a variable function, so there's no way to write a variable function that executes on a remote machine.