Skip to content

Commit

Permalink
Drop dbs yml
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeyGaluzo committed Jun 14, 2024
1 parent 9757d12 commit f3568e6
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions build/jobs/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,23 @@ jobs:
env:
'SqlServer:ConnectionString': $(SqlServer--ConnectionString)

- task: AzurePowerShell@5
displayName: 'Drop Sql Integration Databases'
condition: succeededOrFailed()
inputs:
azureSubscription: $(ConnectedServiceName)
azurePowerShellVersion: latestVersion
ScriptType: inlineScript
Inline: |
$testNamePatterns = @("${{ parameters.version }}_*")
foreach ($pattern in $testNamePatterns) {
$resources = Get-AzResource -ResourceGroupName $(ResourceGroupName) -ResourceType 'Microsoft.Sql/servers/databases' -Name $pattern
foreach ($resource in $resources) {
Write-Host "Cleaning up $($resource.ResourceName)"
Remove-AzResource -ResourceId $resource.ResourceId -Force
}
}
- job: 'cosmosE2eTests'
dependsOn: []
pool:
Expand Down

0 comments on commit f3568e6

Please sign in to comment.