Commit Graph

27 Commits

Author SHA1 Message Date
Azure SDK Bot
c61528188c
Sync eng/common directory with azure-sdk-tools for PR 10532 (#6571)
* Allow for empty serviceDirectory in deploy-test-resources

* Revert some unintentional changes

* Restore missing comment

---------

Co-authored-by: Patrick Hallisey <pahallis@microsoft.com>
2025-05-14 12:45:38 -07:00
Azure SDK Bot
438ad5d6f8
Sync eng/common directory with azure-sdk-tools for PR 10579 (#6564)
* Support writing .env files from Test Resources

If a language repo opts into it *and* if a `test-resources.bicep` file exists and lints clean of writing secrets *and* if the `.env` file is gitignore'd, write a `.env` file next to `test-resources.bicep`.

* Resolve PR feedback

* Pass -Force for . hidden files on non-Windows

---------

Co-authored-by: Heath Stewart <heaths@microsoft.com>
2025-05-09 21:51:43 -07:00
Azure SDK Bot
ab5a01b7cc
chmod +x TestResources scripts (#6421)
Make them executable in bash et. al. without starting separate shell.

Co-authored-by: Heath Stewart <heaths@microsoft.com>
2025-02-14 10:07:38 -08:00
Azure SDK Bot
ae14b41e8e
Sync eng/common directory with azure-sdk-tools for PR 8598 (#5777)
* Set storage account test resources to disable blob public access

* Skip adding network rules to storage accounts that don't need them during cleanup

* Add succeeded check to set pipeline subnet info step

* Disable network firewall by default in resource creation/removal

---------

Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
2024-07-12 17:15:32 -04:00
Azure SDK Bot
bc547c4f4c
Sync eng/common directory with azure-sdk-tools for PR 8558 (#5764)
* Support storage network access and worm removal in remove test resources script

* Move storage network access script to common resource helpers file

* Improve storage container deletion resilience

* Plumb through pool variable to live test cleanup template

* Add sleep for network rule application

---------

Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
2024-07-08 17:56:18 -04:00
Azure SDK Bot
1b8d54e396
Sync eng/common directory with azure-sdk-tools for PR 8319 (#5653)
* Add static file secret-less sub-config support

* Review feedback: if/else

* http -> https

* Update eng/common/TestResources/deploy-test-resources.yml

* Space cleanup

* Add AzurePublicMsft.json

* Remove EnvironmentVariables

---------

Co-authored-by: Daniel Jurek <djurek@microsoft.com>
Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>
2024-05-28 14:43:46 -07:00
Azure SDK Bot
c79967ef99
Sync eng/common directory with azure-sdk-tools for PR 8249 (#5616)
* Add support for Federated Auth to test resources scripts

* Default -- UseFederatedAuth: false

* Clear secrets if FederatedAuth is set

* Template conditions use AzurePowerShell only when a service connection is needed

* Review feedback and pair with Ben

* Update docs

* http:// -> https://

---------

Co-authored-by: Daniel Jurek <djurek@microsoft.com>
2024-05-15 14:17:16 -07:00
Azure SDK Bot
c88d0287e9
Sync eng/common directory with azure-sdk-tools for PR 5242 (#4294)
* Consolidate naming logic and generate short hash names for local use

* Shorten long lines

* Handle issues with EnvironmentVariable parameter ref being updated

* Warn on env variable overwrite. Base name generation off resource group

* Use SHA256 algorithm for short name hash

---------

Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
2023-01-27 15:17:58 -05:00
Azure SDK Bot
61636bba41
Add ResourceType parameter - Selects live test or perf test resources (#3740)
Co-authored-by: Mike Harder <mharder@microsoft.com>
2022-06-16 22:19:21 -07:00
Azure SDK Bot
7889304391
Sync eng/common directory with azure-sdk-tools for PR 3124 (#3546)
* Do not fail remove test resources step when env var is not set.

* Handle empty service directories in remove test resources script

Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
2022-04-11 17:28:51 -07:00
Azure SDK Bot
f0e0070223
Sync eng/common directory with azure-sdk-tools for PR 3067 (#3529)
* Infer live resource group name based on service directory name

* Simplify service directory path splitting

* Use common logic for username and basename generation

* Rename GetServiceName to GetServiceLeafDirectoryName

Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
2022-04-07 11:33:38 -07:00
Azure SDK Bot
45e48d3be5
Fix resource clean-up script (#2747)
- Fix rg.Name to rg.ResourceGroupName
- Add more verbose logging for better debugging
- Handle deleted resource groups when gathering puragable resource
- Remove coerce now that we are collecting in functions

Co-authored-by: Wes Haggard <Wes.Haggard@microsoft.com>
2021-08-13 16:03:04 -07:00
Azure SDK Bot
c92b095088
Sync eng/common directory with azure-sdk-tools for PR 1894 (#2743)
* Purge Key Vaults after deleting resource group

* Resolve PR feedback

* Purge Key Vaults and Managed HSMs

* Clean up all purgeable KVs and MHSMs

* Ignore null/empty purgeable resources

* Resolve PR feedback

* Resolve PR feedback

* Fix logging, process each item when collection piped

Co-authored-by: Heath Stewart <heaths@microsoft.com>
2021-08-12 19:50:53 -07:00
Azure SDK Bot
14cc77a963
Sync eng/common directory with azure-sdk-tools for PR 1548 (#2098)
* Remove passing -Mode Complete to deployment

When passing Complete it will remove any resources
already in the resource group that weren't part
of the current deployment. That removal breaks a
lot of assumptions, like multiple deployments when
testing things like smoke-tests or if you are reusing
an existing resource group. We don't want that to happen.

* Remove ServiceDirectory as required parameter for remove/update

When this was made mandatory it broke some usages which didn't
pass the value. Those usages don't need to pass it because
the pass required information in other ways so removing the
requirement for the parameter to be passed.

Co-authored-by: Wes Haggard <Wes.Haggard@microsoft.com>
2021-04-09 18:10:44 -07:00
Azure SDK Bot
1ab49d17d0
Fix BaseName initialization (#2096)
Initializing the BaseName with a ServiceDirectory that contains
a "/", because it is a multiple level path, causes the BaseName
initialization code to fail because it doesn't support the
validation pattern.

In all the known cases we already pass the ResourceGroupName
explicitly so don't need to set the BaseName so we can
skip the initialization in those cases.

Co-authored-by: Wes Haggard <Wes.Haggard@microsoft.com>
2021-04-09 13:32:50 -07:00
Azure SDK Bot
0c1ec5c69e
Sync eng/common directory with azure-sdk-tools for PR 1525 (#2015)
* Use SubscriptionId throughout TestResources

Fixes #1454

* Resolve PR feedback

* Default DeleteAfterHours to 48 for SDK team

Also makes a few other adjustments for subscriptions, like restoring the previous one if available and another was specified.

* Resolve PR feedback

* Change deployment mode to Complete

Also fixes an issue where if the user opted not to deploy to the same resource group, the script would continue execution anyway.

* Use consistent aka links to satisfy link checker

Only need it for the new Update-TestResources.ps1 script, but I wanted them to look consistent.

Co-authored-by: Heath Stewart <heaths@microsoft.com>
2021-04-01 09:39:24 -07:00
Azure SDK Bot
038d02fd50
Sync eng/common directory with azure-sdk-tools for PR 1163 (#919)
* Update subscription configuration schema to include new parameters

* Support platform specific arm template parameters and legacy hashtable format

* Update arm template parameter comment to include top level key

* Restore AdditionalParameters. Merge ArmTemplateParameters from stringified hash literal

* Handle duplicate keys more explicitly for arm and env vars

* Regenerate New-TestResources.ps1 markdown

* revert variable name to environmentVariables to fix post-scripts

* Handle empty arm template parameters better

* Remove arm template parameter merge logic from deploy template

* Add merge hashes function to New-TestResources.ps1

* Add merge hashes function to New-TestResources.ps1

* Add env variable overwrite warning. Use ContainsKey checks

* Temporarily manually fix invalid generated markdown links

Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
2020-11-09 20:49:45 -05:00
Azure SDK Bot
814a7b9203
Sync eng/common directory with azure-sdk-tools for PR 1146 (#873)
* Remove resource group asynchronously and do not wait for completion

* Verify resource group has reached Deleting state before exiting script

* Use $_ instead of $Error[0] for resource group removal handling

Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
2020-10-29 19:25:21 -04:00
Azure SDK Bot
50376590d9
Sync eng/common directory with azure-sdk-tools repository for Tools PR 1032 (#675) 2020-09-30 11:42:51 -07:00
Azure SDK Bot
d89efac0ea
Sync eng/common directory with azure-sdk-tools repository (#107) 2020-05-15 16:50:15 -07:00
Azure SDK Bot
23121835f2
Sync eng/common directory with azure-sdk-tools repository (#88) 2020-05-07 06:35:10 -07:00
Azure SDK Bot
cad54bd983
Sync eng/common directory with azure-sdk-tools repository (#87) 2020-05-06 07:51:25 -07:00
Azure SDK Bot
bbc8b0b8bb
Sync eng/common directory with azure-sdk-tools repository (#86) 2020-04-30 16:00:46 -07:00
Azure SDK Bot
3370f252d3
Sync eng/common directory with azure-sdk-tools repository (#71) 2020-04-10 16:14:24 -07:00
Azure SDK Bot
4ca8d267d6
Sync eng/common directory with azure-sdk-tools repository (#67) 2020-04-08 16:30:38 -07:00
Azure SDK Bot
c7eab3a3ba
Sync eng/common directory with azure-sdk-tools repository (#66) 2020-04-08 11:41:13 -07:00
Azure SDK Bot
7a02ab023b
Sync eng/common directory with azure-sdk-tools repository (#46) 2020-03-26 10:18:42 -07:00