fix: add try catch for builder creation
This commit is contained in:
Родитель
3b9646a16f
Коммит
40a81d0f70
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче