Cleanup ACI even when workspace cleanup failed (#4969)

This commit is contained in:
Dominic Ayre 2023-02-07 11:26:55 +00:00 коммит произвёл GitHub
Родитель 30468ed25d
Коммит 90f566abd0
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 19 добавлений и 8 удалений

Просмотреть файл

@ -161,8 +161,8 @@ jobs:
done
displayName: "Connect Primary ACI with Secondaries"
- job: cleanup_aci
displayName: "Cleanup ACI"
- job: cleanup_workspace
displayName: "Cleanup Workspace"
pool:
vmImage: ubuntu-20.04
dependsOn:
@ -174,12 +174,6 @@ jobs:
IpAddresses: $[ dependencies.deploy_primary_aci.outputs['deploy_primary_aci.ipAddresses'] ]
sshKey: $[ dependencies.generate_ssh_key.outputs['generate_ssh_key.sshKey'] ]
steps:
- template: azure_cli.yml
parameters:
app_id: $(CCF_SNP_CI_APP_ID)
service_principal_password: $(CCF_SNP_CI_SERVICE_PRINCIPAL_PASSWORD)
tenant: $(CCF_SNP_CI_TENANT)
- template: install_ssh_key.yml
parameters:
ssh_key: $(sshKey)
@ -195,6 +189,23 @@ jobs:
name: cleanup_workspace
displayName: "Cleanup Workspace"
- job: cleanup_aci
displayName: "Cleanup ACI"
pool:
vmImage: ubuntu-20.04
dependsOn:
- generate_ssh_key
- deploy_primary_aci
- cleanup_workspace
- ${{ parameters.used_by }}
condition: always()
steps:
- template: azure_cli.yml
parameters:
app_id: $(CCF_SNP_CI_APP_ID)
service_principal_password: $(CCF_SNP_CI_SERVICE_PRINCIPAL_PASSWORD)
tenant: $(CCF_SNP_CI_TENANT)
- script: |
set -ex
python3.8 -m venv ./scripts/azure_deployment/.env