Initial scripts to create and tear down test resources#9029
Initial scripts to create and tear down test resources#9029heaths merged 6 commits intoAzure:masterfrom
Conversation
|
Can we enable dot-sourcing the script so environment variables are set automatically in current powershell terminal? |
Because setting the environment variables in the current session won't persist, though I suppose that doesn't preclude doing both. But the idea we discussed was to save these to a file anyway. Let's sync back up on that and determine if we're ready for that given the other work going on with credentials. If not, I agree doing both would be great. That said, I still wouldn't allow for it to be sourced. I can just as easily set environment variables in teh script. Sourcing it makes all variables and functions global, and you have to declare the body as a function itself, nor could you support bootstrapping PowerShell from cmd or bash (or other shells) like we plan to (next iteration). In general, you shouldn't source anything other than $profile. If you want to allow people to import into the global namespace (or any other declared namespace), use modules, which can be unloaded. |
|
I like it. Very clean! |
These are the initial scripts to set up and tear down test resources based on a convention we decided. These were testing on Windows and linux using bash, cmd, and pwsh.