Remove test resources before beginning second deployment#2556
Remove test resources before beginning second deployment#2556
Conversation
There was a problem hiding this comment.
Pull request overview
Adds an explicit cleanup step in the live test job to remove previously deployed test resources before kicking off the second test-resources deployment, preventing the first deployment’s resource group from being orphaned when the second deployment overwrites the pipeline variable used for cleanup.
Changes:
- Insert
remove-test-resources.ymlbetween the first live test run and the second test-resources deployment. - Reuse the existing cleanup template/conditions to keep behavior consistent with end-of-job cleanup.
jongio
left a comment
There was a problem hiding this comment.
Correct fix - the mid-pipeline remove prevents the first deployment's resource group from being orphaned when the second deploy overwrites the pipeline variable. Parameters match the existing final cleanup step, and continueOnError: true in the remove template keeps the pipeline safe if removal fails. Variable flow checks out: first deploy sets the RG var, remove cleans it, second deploy sets a new RG var, final cleanup handles that one.
| - template: /eng/common/TestResources/remove-test-resources.yml | ||
| parameters: | ||
| ServiceConnection: azure-sdk-tests-public | ||
| EnvVars: |
What does this PR do?
Adds a step to the CI pipeline to remove test resources before deploying new test resources. This ensure that the first run's resource group isn't left in the subscription after the job completes.
Pre-merge Checklist
servers/Azure.Mcp.Server/README.mdand/orservers/Fabric.Mcp.Server/README.mddocumentationREADME.mdchanges running the script./eng/scripts/Process-PackageReadMe.ps1. See Package READMEToolDescriptionEvaluatorand obtained a score of0.4or more and a top 3 ranking for all related test promptsconsolidated-tools.jsonbreaking-changelabelservers/Azure.Mcp.Server/docs/azmcp-commands.md./eng/scripts/Update-AzCommandsMetadata.ps1to update tool metadata inazmcp-commands.md(required for CI)servers/Azure.Mcp.Server/docs/e2eTestPrompts.mdcrypto mining, spam, data exfiltration, etc.)/azp run mcp - pullrequest - liveto run Live Test Pipeline