Skip to content

Commit

Permalink
fix az cli (#193)
Browse files Browse the repository at this point in the history
  • Loading branch information
OliverMKing authored Apr 15, 2024
1 parent 456722d commit 8689814
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/e2ev2-provision-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,25 @@ jobs:
go-version: '~1.20.3'
cache-dependency-path: "**/*.sum"

- name: install azure-cli 2.58.0 # needed due to az cli regression https://github.com/Azure/login/issues/372. We need to remove this when az cli 2.60 is released and baked into runner image
# install steps from https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=apt
run: |
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release
sudo mkdir -p /etc/apt/keyrings
curl -sLS https://packages.microsoft.com/keys/microsoft.asc |
sudo gpg --dearmor -o /etc/apt/keyrings/microsoft.gpg
sudo chmod go+r /etc/apt/keyrings/microsoft.gpg
AZ_DIST=$(lsb_release -cs)
echo "Types: deb
URIs: https://packages.microsoft.com/repos/azure-cli/
Suites: ${AZ_DIST}
Components: main
Architectures: $(dpkg --print-architecture)
Signed-by: /etc/apt/keyrings/microsoft.gpg" | sudo tee /etc/apt/sources.list.d/azure-cli.sources
AZ_VER=2.58.0
sudo apt-get update && sudo apt-get install azure-cli=${AZ_VER}-1~${AZ_DIST}
- name: Azure login
uses: azure/login@v1
with:
Expand Down Expand Up @@ -67,6 +86,25 @@ jobs:
with:
go-version: '~1.20.3'

- name: install azure-cli 2.58.0 # needed due to az cli regression https://github.com/Azure/login/issues/372. We need to remove this when az cli 2.60 is released and baked into runner image
# install steps from https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=apt
run: |
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release
sudo mkdir -p /etc/apt/keyrings
curl -sLS https://packages.microsoft.com/keys/microsoft.asc |
sudo gpg --dearmor -o /etc/apt/keyrings/microsoft.gpg
sudo chmod go+r /etc/apt/keyrings/microsoft.gpg
AZ_DIST=$(lsb_release -cs)
echo "Types: deb
URIs: https://packages.microsoft.com/repos/azure-cli/
Suites: ${AZ_DIST}
Components: main
Architectures: $(dpkg --print-architecture)
Signed-by: /etc/apt/keyrings/microsoft.gpg" | sudo tee /etc/apt/sources.list.d/azure-cli.sources
AZ_VER=2.58.0
sudo apt-get update && sudo apt-get install azure-cli=${AZ_VER}-1~${AZ_DIST}
- name: Azure login
uses: azure/login@v1
with:
Expand Down

0 comments on commit 8689814

Please sign in to comment.