From 448c0aaecb31cc2cf079d05f690ff027925ce7a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Mon, 29 Jan 2024 14:23:45 +0100 Subject: [PATCH] gha: azure: Set the correct subscription to the account MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Due to the changes done in the CI, we need to set the correct subscription to be used with the account from now on, otherwise we'd end up using CoCo subscription. Fixes: #8946 Signed-off-by: Fabiano FidĂȘncio --- .github/workflows/run-k8s-tests-on-aks.yaml | 1 + .github/workflows/run-kata-deploy-tests-on-aks.yaml | 1 + tests/gha-run-k8s-common.sh | 3 +++ 3 files changed, 5 insertions(+) diff --git a/.github/workflows/run-k8s-tests-on-aks.yaml b/.github/workflows/run-k8s-tests-on-aks.yaml index 28a2cb950d..827aaaec64 100644 --- a/.github/workflows/run-k8s-tests-on-aks.yaml +++ b/.github/workflows/run-k8s-tests-on-aks.yaml @@ -84,6 +84,7 @@ jobs: AZ_APPID: ${{ secrets.AZ_APPID }} AZ_PASSWORD: ${{ secrets.AZ_PASSWORD }} AZ_TENANT_ID: ${{ secrets.AZ_TENANT_ID }} + AZ_SUBSCRIPTION_ID: ${{ secrets.AZ_SUBSCRIPTION_ID }} - name: Create AKS cluster timeout-minutes: 10 diff --git a/.github/workflows/run-kata-deploy-tests-on-aks.yaml b/.github/workflows/run-kata-deploy-tests-on-aks.yaml index 4135fd68e1..a5401c2c17 100644 --- a/.github/workflows/run-kata-deploy-tests-on-aks.yaml +++ b/.github/workflows/run-kata-deploy-tests-on-aks.yaml @@ -67,6 +67,7 @@ jobs: AZ_APPID: ${{ secrets.AZ_APPID }} AZ_PASSWORD: ${{ secrets.AZ_PASSWORD }} AZ_TENANT_ID: ${{ secrets.AZ_TENANT_ID }} + AZ_SUBSCRIPTION_ID: ${{ secrets.AZ_SUBSCRIPTION_ID }} - name: Create AKS cluster timeout-minutes: 10 diff --git a/tests/gha-run-k8s-common.sh b/tests/gha-run-k8s-common.sh index 6e18dc4e9d..475ab41583 100644 --- a/tests/gha-run-k8s-common.sh +++ b/tests/gha-run-k8s-common.sh @@ -52,6 +52,9 @@ function login_azure() { -u "${AZ_APPID}" \ -p "${AZ_PASSWORD}" \ --tenant "${AZ_TENANT_ID}" + + # Switch to the Kata Containers subscription + az account set --subscription "${AZ_SUBSCRIPTION_ID}" } function create_cluster() {