Skip to content

Commit

Permalink
fix: cluster deletion for swiftv2
Browse files Browse the repository at this point in the history
  • Loading branch information
jpayne3506 committed Sep 11, 2024
1 parent 47b4329 commit fb59b6f
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 6 deletions.
36 changes: 32 additions & 4 deletions .pipelines/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ stages:
variables:
commitID: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.commitID'] ]
jobs:
- job: delete
- job: delete_build
displayName: Delete Cluster
pool:
name: "$(BUILD_POOL_NAME_DEFAULT)"
Expand All @@ -435,43 +435,71 @@ stages:
cilium_e2e:
name: cilium_e2e
clusterName: "ciliume2e"
region: $(REGION_AKS_CLUSTER_TEST)
cilium_overlay_e2e:
name: cilium_overlay_e2e
clusterName: "cilovere2e"
region: $(REGION_AKS_CLUSTER_TEST)
cilium_h_overlay_e2e:
name: cilium_h_overlay_e2e
clusterName: "cilwhleovere2e"
region: $(REGION_AKS_CLUSTER_TEST)
azure_overlay_e2e:
name: azure_overlay_e2e
clusterName: "azovere2e"
region: $(REGION_AKS_CLUSTER_TEST)
aks_swift_e2e:
name: aks_swift_e2e
clusterName: "swifte2e"
region: $(REGION_AKS_CLUSTER_TEST)
aks_swift_vnetscale_e2e:
name: aks_swift_vnetscale_e2e
clusterName: "vscaleswifte2e"
region: $(REGION_AKS_CLUSTER_TEST)
aks_ubuntu_22_linux_e2e:
name: aks_ubuntu_22_linux_e2e
clusterName: "ubuntu22e2e"
region: $(REGION_AKS_CLUSTER_TEST)
aks_windows_22_e2e:
name: aks_windows_22_e2e
clusterName: "win22e2e"
region: $(REGION_AKS_CLUSTER_TEST)
dualstackoverlay_e2e:
name: dualstackoverlay_e2e
clusterName: "dsovere2e"
region: $(REGION_DUALSTACKOVERLAY_CLUSTER_TEST)
cilium_dualstackoverlay_e2e:
name: cilium_dualstackoverlay_e2e
clusterName: "cildsovere2e"
region: $(REGION_DUALSTACKOVERLAY_CLUSTER_TEST)
steps:
- template: templates/delete-cluster.yaml
parameters:
name: $(name)
clusterName: $(clusterName)-$(commitID)
region: $(region)
sub: $(SUB_AZURE_NETWORK_AGENT_BUILD_VALIDATIONS)
svcConn: $(BUILD_VALIDATIONS_SERVICE_CONNECTION)

- job: delete_test
displayName: Delete Cluster
pool:
name: "$(BUILD_POOL_NAME_DEFAULT)"
strategy:
matrix:
swiftv2_e2e:
name: swiftv2_e2e
clusterName: "mtcluster"
clusterName: "mtacluster"
region: $(REGION_SWIFTV2_CLUSTER_TEST)
swiftv2_dummy_e2e:
name: swiftv2_dummy_e2e
clusterName: "swiftv2dummy"
region: $(REGION_SWIFTV2_CLUSTER_TEST)
steps:
- template: templates/delete-cluster.yaml
parameters:
name: $(name)
clusterName: $(clusterName)-$(commitID)
region: $(REGION_AKS_CLUSTER_TEST)

region: $(region)
sub: $(SUB_AZURE_NETWORK_AGENT_TEST)
svcConn: $(ACN_TEST_SERVICE_CONNECTION)
4 changes: 2 additions & 2 deletions .pipelines/templates/delete-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ parameters:
steps:
- task: AzureCLI@2
inputs:
azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION)
azureSubscription: ${{ parameters.svcConn }}
scriptLocation: "inlineScript"
scriptType: "bash"
addSpnToEnvironment: true
inlineScript: |
echo "Deleting cluster"
make -C ./hack/aks azcfg AZCLI=az REGION=${{ parameters.region }}
make -C ./hack/aks set-kubeconf AZCLI=az CLUSTER=${{ parameters.clusterName }}
make -C ./hack/aks down AZCLI=az REGION=${{ parameters.region }} SUB=$(SUB_AZURE_NETWORK_AGENT_BUILD_VALIDATIONS) CLUSTER=${{ parameters.clusterName }}
make -C ./hack/aks down AZCLI=az REGION=${{ parameters.region }} SUB=${{ parameters.sub }} CLUSTER=${{ parameters.clusterName }}
echo "Cluster and resources down"
name: delete
displayName: Delete - ${{ parameters.name }}

0 comments on commit fb59b6f

Please sign in to comment.