Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix az aks get-versions command failure #1278

Merged
merged 1 commit into from
Aug 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
ci: fix az aks get-versions command failure
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
  • Loading branch information
aramase committed Aug 18, 2023
commit 032f971dd84a50b46b0598a8f2f0fe9e0beed989
12 changes: 6 additions & 6 deletions .pipelines/templates/aks-setup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ steps:
fi
displayName: "Set cluster name"
condition: succeeded()

- script: |
echo "##vso[task.setvariable variable=NODE_VM_SIZE]Standard_DS2_v2"
displayName: "Determine VM Size"
condition: succeeded()

- script: |
#Run test with latest on preview aks version available
aksVersion=$(az aks get-versions -l $(AZURE_LOCATION) --query "max(orchestrators[?isPreview==null&&orchestratorVersion>'1.20'].orchestratorVersion)" -otsv)
- script: |
# Run test with latest non-preview aks version available
aksVersion=$(az aks get-versions -l $(AZURE_LOCATION) --query 'values[?isPreview==null].patchVersions[]' | jq '[.[] | to_entries[] | .key ] | max')
echo "AKS Install version - $aksVersion"

echo "##vso[task.setvariable variable=AKS_INSTALL_VERSION]$aksVersion"
Expand All @@ -35,9 +35,9 @@ steps:

- ${{ if eq(parameters.testClusterUpgrade, true) }}:
# Overrride AKS_INSTALL_VERSION if testing with k8s upgrade
# If we are running test with cluster upgrade, start with minimum possible non preview version.
# If we are running test with cluster upgrade, start with minimum possible non preview version.
- script: |
aksVersion=$(az aks get-versions -l $(AZURE_LOCATION) --query "min(orchestrators[?isPreview==null&&orchestratorVersion>'1.20'].orchestratorVersion)" -otsv)
aksVersion=$(az aks get-versions -l $(AZURE_LOCATION) --query 'values[?isPreview==null].patchVersions[]' | jq '[.[] | to_entries[] | .key ] | min')
echo "AKS Install version - $aksVersion"

echo "##vso[task.setvariable variable=AKS_INSTALL_VERSION]$aksVersion"
Expand Down