Skip to content

Commit

Permalink
{AKS} Fix AKS live test pipeline (Azure#7742)
Browse files Browse the repository at this point in the history
  • Loading branch information
FumingZhang authored Jun 25, 2024
1 parent 51b283f commit f3ce427
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 17 deletions.
17 changes: 2 additions & 15 deletions src/aks-preview/azcli_aks_live_test/scripts/setup_venv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,6 @@ installAZAKSTOOLFromLocal(){
pip show az-aks-tool
}

# need to be executed in a venv
installAZAKSTOOL(){
wheel_file="az_aks_tool-latest-py3-none-any.whl"
wheel_url="https://akspreview.blob.core.windows.net/azakstool/${wheel_file}"
curl -sLO "${wheel_url}"
installAZAKSTOOLFromLocal "${wheel_file}"
}

# need to be executed in a venv with kusto related modules installed
removeKustoPTHFile(){
pushd azEnv/lib/python"${PYTHON_VERSION}"/site-packages
Expand Down Expand Up @@ -149,13 +141,8 @@ if [[ -n ${setup_option} ]]; then
installBuildTools
elif [[ ${setup_option} == "setup-tool" ]]; then
echo "Start to setup az-aks-tool!"
local_setup=${3:-"n"}
if [[ ${local_setup} == "y" ]]; then
wheel_file=${4:-"/az_aks_tool-latest-py3-none-any.whl"}
installAZAKSTOOLFromLocal "${wheel_file}"
else
installAZAKSTOOL
fi
wheel_file=${3:-$(find / -type f -name "az_aks_tool*" | head -n 1)}
installAZAKSTOOLFromLocal "${wheel_file}"
removeKustoPTHFile
elif [[ ${setup_option} == "setup-az" ]]; then
echo "Start to setup azure-cli!"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
condition: succeeded()
displayName: "Start Container"
- bash: |
docker exec $(ContainerName) /opt/scripts/setup_venv.sh setup-tool y y /az_aks_tool-latest-py3-none-any.whl
docker exec $(ContainerName) /opt/scripts/setup_venv.sh setup-tool y
docker exec $(ContainerName) /opt/scripts/setup_venv.sh setup-az n azure-cli/ azure-cli-extensions/
condition: succeeded()
displayName: "Set up Virtual Environment"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
condition: succeeded()
displayName: "Start Container"
- bash: |
docker exec $(ContainerName) /opt/scripts/setup_venv.sh setup-tool y y /az_aks_tool-latest-py3-none-any.whl
docker exec $(ContainerName) /opt/scripts/setup_venv.sh setup-tool y
docker exec $(ContainerName) /opt/scripts/setup_venv.sh setup-az n azure-cli/ azure-cli-extensions/
condition: succeeded()
displayName: "Set up Virtual Environment"
Expand Down

0 comments on commit f3ce427

Please sign in to comment.