96 строки
4.2 KiB
YAML
96 строки
4.2 KiB
YAML
pr: none
|
|
trigger: none
|
|
|
|
parameters:
|
|
- name: DryRun
|
|
type: boolean
|
|
default: false
|
|
- name: Subscriptions
|
|
type: object
|
|
default:
|
|
- DisplayName: AzureCloud - Resource Cleanup
|
|
SubscriptionConfigurations:
|
|
- $(sub-config-azure-cloud-test-resources)
|
|
AdditionalParameters: "-DeleteNonCompliantGroups -DeleteArmDeployments"
|
|
- DisplayName: AzureCloud-Preview - Resource Cleanup
|
|
SubscriptionConfigurations:
|
|
- $(sub-config-azure-cloud-test-resources-preview)
|
|
AdditionalParameters: "-DeleteArmDeployments"
|
|
# TODO: Enable strict resource cleanup after pre-existing static groups have been handled
|
|
# AdditionalParameters: "-DeleteNonCompliantGroups"
|
|
- DisplayName: AzureUSGovernment - Resource Cleanup
|
|
SubscriptionConfigurations:
|
|
- $(sub-config-gov-test-resources)
|
|
# TODO: Enable strict resource cleanup after pre-existing static groups have been handled
|
|
# AdditionalParameters: "-DeleteNonCompliantGroups"
|
|
- DisplayName: AzureChinaCloud - Resource Cleanup
|
|
SubscriptionConfigurations:
|
|
- $(sub-config-cn-test-resources)
|
|
# TODO: Enable strict resource cleanup after pre-existing static groups have been handled
|
|
# AdditionalParameters: "-DeleteNonCompliantGroups"
|
|
- DisplayName: AzureCloud Playground - Resource Cleanup
|
|
SubscriptionConfigurations:
|
|
- $(sub-config-azure-cloud-playground)
|
|
AdditionalParameters: "-DeleteNonCompliantGroups -DeleteArmDeployments -MaxLifespanDeleteAfterHours 240"
|
|
# TODO: Disabled this clean-up as the dogfood enviroment is busted and the tests are no longer running
|
|
# see https://github.com/Azure/azure-sdk-for-python/pull/33483 were the tests were disabled.
|
|
# - DisplayName: Dogfood Translation - Resource Cleanup
|
|
# SubscriptionConfigurations:
|
|
# - $(sub-config-translation-int-test-resources)
|
|
# TODO: re-enable dogfood cleanup after resource deletion issues are solved, to avoid pipeline timeouts
|
|
# - DisplayName: Dogfood ACS - Resource Cleanup
|
|
# SubscriptionConfigurations:
|
|
# - $(sub-config-communication-int-test-resources-common)
|
|
- DisplayName: AzureCloud ACS - Resource Cleanup
|
|
SubscriptionConfigurations:
|
|
- $(sub-config-azure-cloud-test-resources)
|
|
- $(sub-config-communication-services-cloud-test-resources-common)
|
|
- DisplayName: AzureCloud Cosmos - Resource Cleanup
|
|
SubscriptionConfigurations:
|
|
- $(sub-config-azure-cloud-test-resources)
|
|
- $(sub-config-cosmos-azure-cloud-test-resources)
|
|
- DisplayName: AzureCloud Storage NET - Resource Cleanup
|
|
SubscriptionConfigurations:
|
|
- $(sub-config-azure-cloud-test-resources)
|
|
- $(sub-config-storage-test-resources-net)
|
|
|
|
stages:
|
|
- stage: Run
|
|
|
|
variables:
|
|
- template: ./templates/variables/globals.yml
|
|
- name: DailyCacheKey
|
|
value: $[format('{0:ddMMyyyy}', pipeline.startTime)]
|
|
- name: CachePath
|
|
value: CleanupCache
|
|
|
|
jobs:
|
|
- job: Run
|
|
pool:
|
|
name: azsdk-pool-mms-ubuntu-2204-general
|
|
vmImage: ubuntu-22.04
|
|
|
|
steps:
|
|
- template: /eng/common/pipelines/templates/steps/cache-ps-modules.yml
|
|
|
|
- task: Cache@2
|
|
inputs:
|
|
# CacheSalt is an optional variable that can be overridden at pipeline runtime to
|
|
# force invalidate the cache.
|
|
# DailyCacheKey will trigger a new cache entry to refresh once per day.
|
|
key: '"$(CacheSalt)" | "$(DailyCacheKey)" | $(Build.SourcesDirectory)/eng/scripts/live-test-resource-cleanup.ps1'
|
|
path: $(CachePath)
|
|
displayName: Cache Github Alias Mappings
|
|
|
|
# Register the dogfood environment to clean up any custom subscriptions in it
|
|
- template: /eng/common/TestResources/setup-environments.yml
|
|
|
|
- ${{ each subscription in parameters.Subscriptions }}:
|
|
- template: ./live-test-cleanup-template.yml
|
|
parameters:
|
|
DryRun: ${{ parameters.DryRun }}
|
|
DisplayName: ${{ subscription.DisplayName }}
|
|
SubscriptionConfigurations: ${{ subscription.SubscriptionConfigurations }}
|
|
GithubAliasCachePath: $(CachePath)/github-alias-mappings.txt
|
|
AdditionalParameters: ${{ subscription.AdditionalParameters }}
|