1
0
Форкнуть 0

fix: add try catch for builder creation

This commit is contained in:
Isabelle Bersano 2023-08-31 10:05:39 -04:00
Родитель 3b9646a16f
Коммит 40a81d0f70
1 изменённых файлов: 6 добавлений и 3 удалений

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

@ -499,14 +499,17 @@ jobs:
set -eu
az extension add --name spring -y
az spring list -o table
EXISTS=$(az spring build-service builder show --name build-springappslza --resource-group $(spring_apps_rg) --service $(spring_apps_service_name) --query 'name' -o tsv 2>&1)
if [ $EXISTS != 'build-springappslza' ]; then
try{
az spring build-service builder show --name build-springappslza --resource-group $(spring_apps_rg) --service $(spring_apps_service_name) --query 'name' -o tsv
echo "Builder exists. Continuing with microservices deployment."
}
catch{
az spring build-service builder create \
--resource-group $(spring_apps_rg) \
--name build-springappslza \
--service $(spring_apps_service_name) \
--builder-file azure-spring-apps-enterprise/resources/json/tbs/builder.json
fi
}
addSpnToEnvironment: true
- task: AzureCLI@2
displayName: Deploy acme-payment