This commit is contained in:
Changho Hwang
2026-03-07 02:48:08 +00:00
parent e0c7ddb5ff
commit c40a233f55
2 changed files with 27 additions and 1 deletions

View File

@@ -34,6 +34,20 @@ parameters:
default: ''
steps:
# 0. Ensure Azure CLI exists before running AzureCLI@2 tasks.
- task: Bash@3
name: EnsureAzureCLI
displayName: Ensure Azure CLI Installed
inputs:
targetType: inline
script: |
set -e
if command -v az >/dev/null 2>&1; then
az version >/dev/null
exit 0
fi
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
# 1. Check VMSS availability (fast, fail-fast)
- task: AzureCLI@2
name: CheckVMSS
@@ -115,7 +129,6 @@ steps:
script: |
sudo apt-get update -y
sudo apt-get install pssh -y
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
- task: AzureCLI@2
name: StartVMSS

View File

@@ -8,6 +8,19 @@ parameters:
default: mscclpp
steps:
- task: Bash@3
name: EnsureAzureCLI
displayName: Ensure Azure CLI Installed
inputs:
targetType: inline
script: |
set -e
if command -v az >/dev/null 2>&1; then
az version >/dev/null
exit 0
fi
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
- task: AzureCLI@2
name: StopVMSS
displayName: Deallocate VMSS