We have a limited amount of build servers and we are building software for multiple releases of Matlab. Unfortunately Matlab Compiler requires a version of the runtime library that matches the Matlab release to compile against.
I have added all Matlab releases runtime libraries to the path and let Matlab do a best guess on for the runtime to compile against. AFAICT this works properly at the moment. However to have more control it would be nice to not have a general PATH set on the build machine (or the build job), but it would be nice if we could attach some environmental variables to the builder itself. I would also like this to differentiate between 32/64 bit libraries.
This way I can specify different PATH settings for different versions of Matlab Compiler, which will make sure that only the matching runtime libraries are in the PATH
tl;dr: So, is it possible to attach environment variables to the (command line) builder so jobs/taks inherit it?
You can use Setx to set environment variables in a earlier task; however, this will actually change the environment variable and may cause a race condition depending on how your plans and/or branches are setup.
-or-
You can write a script (.bat or .ps1 for example) and use Set which will only have a scope of the process that is running the script. For Bamboo it will essentially be the scope of that script so you can embed you commands after the Set command and they will use that. Batch and Powershell scripts can be passed arguments so you can still get some dynamic features/variables from Bamboo into your script.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.