Skip to content

Commit

Permalink
Bump azure cli version
Browse files Browse the repository at this point in the history
  • Loading branch information
RafalKorepta committed Dec 12, 2023
1 parent 7bc0666 commit 7aeb4ec
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions .buildkite/hooks/pre-command
Original file line number Diff line number Diff line change
Expand Up @@ -133,32 +133,32 @@ test_aks() {

export TEST_STORAGE_ACCOUNT TEST_RESOURCE_GROUP TEST_STORAGE_CONTAINER

docker run -v $(realpath .azure):/root/.azure mcr.microsoft.com/azure-cli:2.50.0 \
docker run -v $(realpath .azure):/root/.azure mcr.microsoft.com/azure-cli:2.55.0 \
az login --service-principal \
--username $AZURE_CLIENT_ID \
--password $AZURE_CLIENT_SECRET \
--tenant $AZURE_TENANT_ID

docker run -v $(realpath .azure):/root/.azure mcr.microsoft.com/azure-cli:2.50.0 \
docker run -v $(realpath .azure):/root/.azure mcr.microsoft.com/azure-cli:2.55.0 \
az group create \
--name $TEST_RESOURCE_GROUP \
--location eastus2

docker run -v $(realpath .azure):/root/.azure mcr.microsoft.com/azure-cli:2.50.0 \
docker run -v $(realpath .azure):/root/.azure mcr.microsoft.com/azure-cli:2.55.0 \
az storage account create \
--name $TEST_STORAGE_ACCOUNT \
--resource-group $TEST_RESOURCE_GROUP \
--location eastus2 \
--sku Standard_RAGRS \
--kind StorageV2

docker run -v $(realpath .azure):/root/.azure mcr.microsoft.com/azure-cli:2.50.0 \
docker run -v $(realpath .azure):/root/.azure mcr.microsoft.com/azure-cli:2.55.0 \
az storage container create \
--name $TEST_STORAGE_CONTAINER \
--account-name $TEST_STORAGE_ACCOUNT


TEST_AZURE_SHARED_KEY=$(docker run -v $(realpath .azure):/root/.azure mcr.microsoft.com/azure-cli:2.50.0 az storage account keys list -g $TEST_RESOURCE_GROUP -n $TEST_STORAGE_ACCOUNT --query '[0].value' -o tsv)
TEST_AZURE_SHARED_KEY=$(docker run -v $(realpath .azure):/root/.azure mcr.microsoft.com/azure-cli:2.55.0 az storage account keys list -g $TEST_RESOURCE_GROUP -n $TEST_STORAGE_ACCOUNT --query '[0].value' -o tsv)
export TEST_AZURE_SHARED_KEY

trap kind_dump EXIT
Expand Down
8 changes: 4 additions & 4 deletions .buildkite/hooks/pre-exit
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,22 @@ cleanup_aks() {

export CI TEST_STORAGE_ACCOUNT TEST_RESOURCE_GROUP

docker run -v $(realpath .azure):/root/.azure mcr.microsoft.com/azure-cli:2.50.0 \
docker run -v $(realpath .azure):/root/.azure mcr.microsoft.com/azure-cli:2.55.0 \
az login --service-principal \
--username 918839a6-3e96-4950-8bf2-f56d0a2e7447 \
--password $AZURE_CLIENT_SECRET \
--tenant 9a95fd9e-005d-487a-9a01-d08c1eab2757 || true

docker run -v $(realpath .azure):/root/.azure mcr.microsoft.com/azure-cli:2.50.0 \
docker run -v $(realpath .azure):/root/.azure mcr.microsoft.com/azure-cli:2.55.0 \
az storage account delete \
--name $TEST_STORAGE_ACCOUNT \
--resource-group $TEST_RESOURCE_GROUP \
--yes

docker run -v $(realpath .azure):/root/.azure mcr.microsoft.com/azure-cli:2.50.0 \
docker run -v $(realpath .azure):/root/.azure mcr.microsoft.com/azure-cli:2.55.0 \
az group delete --resource-group $TEST_RESOURCE_GROUP --yes --debug

docker run -v $(realpath .azure):/root/.azure mcr.microsoft.com/azure-cli:2.50.0 \
docker run -v $(realpath .azure):/root/.azure mcr.microsoft.com/azure-cli:2.55.0 \
az group delete --resource-group $TEST_RESOURCE_GROUP --yes --debug || true
}

Expand Down
2 changes: 1 addition & 1 deletion .buildkite/scripts/cloud-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ gke() {

aks() {
echo '--- testing that there is data in the azure storage container'
if (docker run -v $(realpath .azure):/root/.azure mcr.microsoft.com/azure-cli:2.50.0 az storage blob list -c $TEST_STORAGE_CONTAINER --account-key $TEST_AZURE_SHARED_KEY --account-name $TEST_STORAGE_ACCOUNT --query "[].{name:name}" --output tsv | grep manifest.json ); then
if (docker run -v $(realpath .azure):/root/.azure mcr.microsoft.com/azure-cli:2.55.0 az storage blob list -c $TEST_STORAGE_CONTAINER --account-key $TEST_AZURE_SHARED_KEY --account-name $TEST_STORAGE_ACCOUNT --query "[].{name:name}" --output tsv | grep manifest.json ); then
echo "Manifest found. Success!"
else
echo "No manifest uploaded. Cloud-storage test failed."
Expand Down

0 comments on commit 7aeb4ec

Please sign in to comment.