Skip to content

Commit 3d058ff

Browse files
authored
[backport] ci: PR pipeline yaml cleanup (#3126)
* ci: Cleanup ACN PR pipeline yaml (#2861) ci: cleanup PR yaml * [fix] ci: cluster deletion for swiftv2 (#2986) fix: cluster deletion for swiftv2
1 parent 8ab9122 commit 3d058ff

File tree

2 files changed

+38
-83
lines changed

2 files changed

+38
-83
lines changed

.pipelines/pipeline.yaml

Lines changed: 36 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,6 @@ stages:
170170
os_version: $(os_version)
171171
- job: containerize_linux_arm64
172172
displayName: Build Images
173-
variables:
174-
TAG: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.Tag'] ]
175173
pool:
176174
name: "$(BUILD_POOL_NAME_LINUX_ARM64)"
177175
strategy:
@@ -202,46 +200,13 @@ stages:
202200
arch: $(arch)
203201
name: $(name)
204202
os: $(os)
205-
- job: check_tag
206-
displayName: Check Tag
207-
pool:
208-
name: $(BUILD_POOL_NAME_DEFAULT)
209-
steps:
210-
- script: |
211-
echo "##vso[task.setvariable variable=currentTagBuild;isOutput=true]$(make version)"
212-
name: "CurrentTagBuild"
213-
displayName: "Set current tag variable"
214-
condition: always()
215-
216-
- stage: validate1
217-
displayName: Validate Tags
218-
dependsOn:
219-
- setup
220-
- containerize
221-
variables:
222-
TAG: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.Tag'] ]
223-
CURRENT_VERSION: $[ stagedependencies.containerize.check_tag.outputs['CurrentTagBuild.currentTagBuild'] ]
224-
condition: ne(variables.TAG, variables.CURRENT_VERSION)
225-
jobs:
226-
- job: timeout_and_cancel
227-
displayName: Cancel Run
228-
pool:
229-
name: $(BUILD_POOL_NAME_DEFAULT)
230-
steps:
231-
- script: |
232-
echo $TAG
233-
echo $CURRENT_VERSION
234-
echo "Checking if branch up to date with master"
235203

236204
- stage: publish
237205
displayName: Publish Multiarch Manifests
238206
dependsOn:
239207
- containerize
240208
variables:
241-
TAG: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.Tag'] ]
242-
CURRENT_VERSION: $[ stagedependencies.containerize.check_tag.outputs['CurrentTagBuild.currentTagBuild'] ]
243209
Packaging.EnableSBOMSigning: false
244-
condition: and(succeeded(), eq(variables.TAG, variables.CURRENT_VERSION))
245210
jobs:
246211
- job: manifest
247212
displayName: Compile Manifests
@@ -274,17 +239,6 @@ stages:
274239
name: $(name)
275240
os_versions: $(os_versions)
276241
platforms: $(platforms)
277-
tag: $(TAG)
278-
- job: check_tag
279-
displayName: Check Tag
280-
pool:
281-
name: $(BUILD_POOL_NAME_DEFAULT)
282-
steps:
283-
- script: |
284-
echo "##vso[task.setvariable variable=currentTagManifests;isOutput=true]$(make version)"
285-
name: "CurrentTagManifests"
286-
displayName: "Set current tag variable"
287-
condition: always()
288242

289243
# Cilium Podsubnet E2E tests
290244
- template: singletenancy/cilium/cilium-e2e-job-template.yaml
@@ -430,6 +384,7 @@ stages:
430384
- aks_swift_e2e
431385
- cilium_e2e
432386
- cilium_overlay_e2e
387+
- cilium_h_overlay_e2e
433388
- aks_ubuntu_22_linux_e2e
434389
- aks_swift_vnetscale_e2e
435390
- aks_windows_22_e2e
@@ -439,7 +394,7 @@ stages:
439394
variables:
440395
commitID: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.commitID'] ]
441396
jobs:
442-
- job: delete
397+
- job: delete_build
443398
displayName: Delete Cluster
444399
pool:
445400
name: "$(BUILD_POOL_NAME_DEFAULT)"
@@ -448,71 +403,71 @@ stages:
448403
cilium_e2e:
449404
name: cilium_e2e
450405
clusterName: "ciliume2e"
406+
region: $(REGION_AKS_CLUSTER_TEST)
451407
cilium_overlay_e2e:
452408
name: cilium_overlay_e2e
453409
clusterName: "cilovere2e"
410+
region: $(REGION_AKS_CLUSTER_TEST)
411+
cilium_h_overlay_e2e:
412+
name: cilium_h_overlay_e2e
413+
clusterName: "cilwhleovere2e"
414+
region: $(REGION_AKS_CLUSTER_TEST)
454415
azure_overlay_e2e:
455416
name: azure_overlay_e2e
456417
clusterName: "azovere2e"
418+
region: $(REGION_AKS_CLUSTER_TEST)
457419
aks_swift_e2e:
458420
name: aks_swift_e2e
459421
clusterName: "swifte2e"
422+
region: $(REGION_AKS_CLUSTER_TEST)
460423
aks_swift_vnetscale_e2e:
461424
name: aks_swift_vnetscale_e2e
462425
clusterName: "vscaleswifte2e"
463-
azure_overlay_cni_e2e:
464-
name: "azure_overlay_cni_e2e"
465-
clusterName: "azovercnie2e"
466-
cilium_podsubnet_cni_e2e:
467-
name: cilium_podsubnet_cni_e2e
468-
clusterName: "cilpodcnie2e"
469-
cilium_overlay_cni_e2e:
470-
name: cilium_overlay_cni_e2e
471-
clusterName: "cilovercnie2e"
472-
aks_swift_cni_e2e:
473-
name: aks_swift_cni_e2e
474-
clusterName: "swiftcnie2e"
426+
region: $(REGION_AKS_CLUSTER_TEST)
475427
aks_ubuntu_22_linux_e2e:
476428
name: aks_ubuntu_22_linux_e2e
477429
clusterName: "ubuntu22e2e"
430+
region: $(REGION_AKS_CLUSTER_TEST)
478431
aks_windows_22_e2e:
479432
name: aks_windows_22_e2e
480433
clusterName: "win22e2e"
434+
region: $(REGION_AKS_CLUSTER_TEST)
481435
dualstackoverlay_e2e:
482436
name: dualstackoverlay_e2e
483437
clusterName: "dsovere2e"
438+
region: $(REGION_DUALSTACKOVERLAY_CLUSTER_TEST)
484439
cilium_dualstackoverlay_e2e:
485440
name: cilium_dualstackoverlay_e2e
486441
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:
487458
swiftv2_e2e:
488459
name: swiftv2_e2e
489-
clusterName: "mtcluster"
460+
clusterName: "mtacluster"
461+
region: $(REGION_SWIFTV2_CLUSTER_TEST)
490462
swiftv2_dummy_e2e:
491463
name: swiftv2_dummy_e2e
492464
clusterName: "swiftv2dummy"
465+
region: $(REGION_SWIFTV2_CLUSTER_TEST)
493466
steps:
494467
- template: templates/delete-cluster.yaml
495468
parameters:
496469
name: $(name)
497470
clusterName: $(clusterName)-$(commitID)
498-
region: $(REGION_AKS_CLUSTER_TEST)
499-
500-
- stage: validate2
501-
displayName: Validate Tags
502-
dependsOn:
503-
- setup
504-
- publish
505-
variables:
506-
TAG: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.Tag'] ]
507-
CURRENT_VERSION: $[ stagedependencies.publish.check_tag.outputs['CurrentTagManifests.currentTagManifests'] ]
508-
condition: ne(variables.TAG, variables.CURRENT_VERSION)
509-
jobs:
510-
- job: timeout_and_cancel
511-
displayName: Cancel Run
512-
pool:
513-
name: $(BUILD_POOL_NAME_DEFAULT)
514-
steps:
515-
- script: |
516-
echo $TAG
517-
echo $CURRENT_VERSION
518-
echo "Checking if branch is up to date with master"
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)