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.
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.
I'm John Allspaw, co-founder of Adaptive Capacity Labs, where we help teams use their incidents to learn and improve. We bring research-driven methods and approaches to drive effective inciden...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs