Skip to content

Commit 9edee56

Browse files
authored
Make testing on an AKS cluster a bit easier (#4201)
Adding a DIR override to some tarets so we can point them at the AKS directory rather than the default KIND directory, in case we want to run the tests against an AKS cluster.
1 parent 03d1307 commit 9edee56

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

Taskfile.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -356,8 +356,9 @@ tasks:
356356
--set crdPattern=*"
357357
- task: controller:wait-for-operator-ready
358358
vars:
359+
DIR: "{{.DIR | default .KIND_WORKLOAD_IDENTITY_PATH}}"
359360
AZURE_MI_CLIENT_ID:
360-
sh: "cat {{.KIND_WORKLOAD_IDENTITY_PATH}}/azure/miclientid.txt"
361+
sh: "cat {{.DIR}}/azure/miclientid.txt"
361362

362363
controller:test-upgrade-pre:
363364
desc: Test upgrading {{.CONTROLLER_APP}} and helm chart for new release
@@ -368,8 +369,9 @@ tasks:
368369
- "kubectl create namespace pre-release"
369370
- "go test -timeout 15m -count=1 -v -run Test_Pre_Release_ResourceCanBeCreated_BeforeUpgrade ./test/pre-release"
370371
vars:
372+
DIR: "{{.DIR | default .KIND_WORKLOAD_IDENTITY_PATH}}"
371373
AZURE_MI_CLIENT_ID:
372-
sh: "cat {{.KIND_WORKLOAD_IDENTITY_PATH}}/azure/miclientid.txt"
374+
sh: "cat {{.DIR}}/azure/miclientid.txt"
373375

374376
controller:test-upgrade-apply-prerelease-chart:
375377
desc: Apply the {{.CONTROLLER_APP}} prelease chart for new release
@@ -379,8 +381,9 @@ tasks:
379381
- task: controller:package-helm-manifest
380382
- task: controller:install-helm-wi
381383
vars:
384+
DIR: "{{.DIR | default .KIND_WORKLOAD_IDENTITY_PATH}}"
382385
AZURE_MI_CLIENT_ID:
383-
sh: "cat {{.KIND_WORKLOAD_IDENTITY_PATH}}/azure/miclientid.txt"
386+
sh: "cat {{.DIR}}/azure/miclientid.txt"
384387

385388
controller:test-upgrade-post:
386389
desc: Test upgrading {{.CONTROLLER_APP}} and helm chart for new release
@@ -962,8 +965,9 @@ tasks:
962965
- "{{.SCRIPTS_ROOT}}/deploy-testing-secret.sh workloadidentity"
963966
env:
964967
# Override the AZURE_CLIENT_ID env variable here
968+
DIR: "{{.DIR | default .KIND_WORKLOAD_IDENTITY_PATH}}"
965969
AZURE_MI_CLIENT_ID: # TODO: Ideally would override AZURE_CLIENT_ID here but we can't because of https://github.com/go-task/task/issues/1038
966-
sh: "cat {{.KIND_WORKLOAD_IDENTITY_PATH}}/azure/miclientid.txt"
970+
sh: "cat {{.DIR}}/azure/miclientid.txt"
967971

968972
controller:deploy-multitenant-testing-secret:
969973
desc: Deploy a multitenant testing secret

0 commit comments

Comments
 (0)