Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] ci: cluster deletion for swiftv2 #2986

Merged
merged 1 commit into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
sheylatrudo marked this conversation as resolved.
Show resolved Hide resolved
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 }}
Loading