Skip to content

Commit c87dfad

Browse files
committed
[fix] ci: cluster deletion for swiftv2 (#2986)
fix: cluster deletion for swiftv2
1 parent b64ee40 commit c87dfad

File tree

2 files changed

+34
-6
lines changed

2 files changed

+34
-6
lines changed

.pipelines/pipeline.yaml

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ stages:
394394
variables:
395395
commitID: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.commitID'] ]
396396
jobs:
397-
- job: delete
397+
- job: delete_build
398398
displayName: Delete Cluster
399399
pool:
400400
name: "$(BUILD_POOL_NAME_DEFAULT)"
@@ -403,43 +403,71 @@ stages:
403403
cilium_e2e:
404404
name: cilium_e2e
405405
clusterName: "ciliume2e"
406+
region: $(REGION_AKS_CLUSTER_TEST)
406407
cilium_overlay_e2e:
407408
name: cilium_overlay_e2e
408409
clusterName: "cilovere2e"
410+
region: $(REGION_AKS_CLUSTER_TEST)
409411
cilium_h_overlay_e2e:
410412
name: cilium_h_overlay_e2e
411413
clusterName: "cilwhleovere2e"
414+
region: $(REGION_AKS_CLUSTER_TEST)
412415
azure_overlay_e2e:
413416
name: azure_overlay_e2e
414417
clusterName: "azovere2e"
418+
region: $(REGION_AKS_CLUSTER_TEST)
415419
aks_swift_e2e:
416420
name: aks_swift_e2e
417421
clusterName: "swifte2e"
422+
region: $(REGION_AKS_CLUSTER_TEST)
418423
aks_swift_vnetscale_e2e:
419424
name: aks_swift_vnetscale_e2e
420425
clusterName: "vscaleswifte2e"
426+
region: $(REGION_AKS_CLUSTER_TEST)
421427
aks_ubuntu_22_linux_e2e:
422428
name: aks_ubuntu_22_linux_e2e
423429
clusterName: "ubuntu22e2e"
430+
region: $(REGION_AKS_CLUSTER_TEST)
424431
aks_windows_22_e2e:
425432
name: aks_windows_22_e2e
426433
clusterName: "win22e2e"
434+
region: $(REGION_AKS_CLUSTER_TEST)
427435
dualstackoverlay_e2e:
428436
name: dualstackoverlay_e2e
429437
clusterName: "dsovere2e"
438+
region: $(REGION_DUALSTACKOVERLAY_CLUSTER_TEST)
430439
cilium_dualstackoverlay_e2e:
431440
name: cilium_dualstackoverlay_e2e
432441
clusterName: "cildsovere2e"
442+
region: $(REGION_DUALSTACKOVERLAY_CLUSTER_TEST)
443+
steps:
444+
- template: templates/delete-cluster.yaml
445+
parameters:
446+
name: $(name)
447+
clusterName: $(clusterName)-$(commitID)
448+
region: $(region)
449+
sub: $(SUB_AZURE_NETWORK_AGENT_BUILD_VALIDATIONS)
450+
svcConn: $(BUILD_VALIDATIONS_SERVICE_CONNECTION)
451+
452+
- job: delete_test
453+
displayName: Delete Cluster
454+
pool:
455+
name: "$(BUILD_POOL_NAME_DEFAULT)"
456+
strategy:
457+
matrix:
433458
swiftv2_e2e:
434459
name: swiftv2_e2e
435-
clusterName: "mtcluster"
460+
clusterName: "mtacluster"
461+
region: $(REGION_SWIFTV2_CLUSTER_TEST)
436462
swiftv2_dummy_e2e:
437463
name: swiftv2_dummy_e2e
438464
clusterName: "swiftv2dummy"
465+
region: $(REGION_SWIFTV2_CLUSTER_TEST)
439466
steps:
440467
- template: templates/delete-cluster.yaml
441468
parameters:
442469
name: $(name)
443470
clusterName: $(clusterName)-$(commitID)
444-
region: $(REGION_AKS_CLUSTER_TEST)
445-
471+
region: $(region)
472+
sub: $(SUB_AZURE_NETWORK_AGENT_TEST)
473+
svcConn: $(ACN_TEST_SERVICE_CONNECTION)

.pipelines/templates/delete-cluster.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ parameters:
66
steps:
77
- task: AzureCLI@2
88
inputs:
9-
azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION)
9+
azureSubscription: ${{ parameters.svcConn }}
1010
scriptLocation: "inlineScript"
1111
scriptType: "bash"
1212
addSpnToEnvironment: true
1313
inlineScript: |
1414
echo "Deleting cluster"
1515
make -C ./hack/aks azcfg AZCLI=az REGION=${{ parameters.region }}
1616
make -C ./hack/aks set-kubeconf AZCLI=az CLUSTER=${{ parameters.clusterName }}
17-
make -C ./hack/aks down AZCLI=az REGION=${{ parameters.region }} SUB=$(SUB_AZURE_NETWORK_AGENT_BUILD_VALIDATIONS) CLUSTER=${{ parameters.clusterName }}
17+
make -C ./hack/aks down AZCLI=az REGION=${{ parameters.region }} SUB=${{ parameters.sub }} CLUSTER=${{ parameters.clusterName }}
1818
echo "Cluster and resources down"
1919
name: delete
2020
displayName: Delete - ${{ parameters.name }}

0 commit comments

Comments
 (0)