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

[backport] ci: PR pipeline yaml cleanup #3126

Merged
merged 2 commits into from
Nov 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
117 changes: 36 additions & 81 deletions .pipelines/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,6 @@ stages:
os_version: $(os_version)
- job: containerize_linux_arm64
displayName: Build Images
variables:
TAG: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.Tag'] ]
pool:
name: "$(BUILD_POOL_NAME_LINUX_ARM64)"
strategy:
Expand Down Expand Up @@ -202,46 +200,13 @@ stages:
arch: $(arch)
name: $(name)
os: $(os)
- job: check_tag
displayName: Check Tag
pool:
name: $(BUILD_POOL_NAME_DEFAULT)
steps:
- script: |
echo "##vso[task.setvariable variable=currentTagBuild;isOutput=true]$(make version)"
name: "CurrentTagBuild"
displayName: "Set current tag variable"
condition: always()
- stage: validate1
displayName: Validate Tags
dependsOn:
- setup
- containerize
variables:
TAG: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.Tag'] ]
CURRENT_VERSION: $[ stagedependencies.containerize.check_tag.outputs['CurrentTagBuild.currentTagBuild'] ]
condition: ne(variables.TAG, variables.CURRENT_VERSION)
jobs:
- job: timeout_and_cancel
displayName: Cancel Run
pool:
name: $(BUILD_POOL_NAME_DEFAULT)
steps:
- script: |
echo $TAG
echo $CURRENT_VERSION
echo "Checking if branch up to date with master"

- stage: publish
displayName: Publish Multiarch Manifests
dependsOn:
- containerize
variables:
TAG: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.Tag'] ]
CURRENT_VERSION: $[ stagedependencies.containerize.check_tag.outputs['CurrentTagBuild.currentTagBuild'] ]
Packaging.EnableSBOMSigning: false
condition: and(succeeded(), eq(variables.TAG, variables.CURRENT_VERSION))
jobs:
- job: manifest
displayName: Compile Manifests
Expand Down Expand Up @@ -274,17 +239,6 @@ stages:
name: $(name)
os_versions: $(os_versions)
platforms: $(platforms)
tag: $(TAG)
- job: check_tag
displayName: Check Tag
pool:
name: $(BUILD_POOL_NAME_DEFAULT)
steps:
- script: |
echo "##vso[task.setvariable variable=currentTagManifests;isOutput=true]$(make version)"
name: "CurrentTagManifests"
displayName: "Set current tag variable"
condition: always()

# Cilium Podsubnet E2E tests
- template: singletenancy/cilium/cilium-e2e-job-template.yaml
Expand Down Expand Up @@ -430,6 +384,7 @@ stages:
- aks_swift_e2e
- cilium_e2e
- cilium_overlay_e2e
- cilium_h_overlay_e2e
- aks_ubuntu_22_linux_e2e
- aks_swift_vnetscale_e2e
- aks_windows_22_e2e
Expand All @@ -439,7 +394,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 @@ -448,71 +403,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"
azure_overlay_cni_e2e:
name: "azure_overlay_cni_e2e"
clusterName: "azovercnie2e"
cilium_podsubnet_cni_e2e:
name: cilium_podsubnet_cni_e2e
clusterName: "cilpodcnie2e"
cilium_overlay_cni_e2e:
name: cilium_overlay_cni_e2e
clusterName: "cilovercnie2e"
aks_swift_cni_e2e:
name: aks_swift_cni_e2e
clusterName: "swiftcnie2e"
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)

- stage: validate2
displayName: Validate Tags
dependsOn:
- setup
- publish
variables:
TAG: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.Tag'] ]
CURRENT_VERSION: $[ stagedependencies.publish.check_tag.outputs['CurrentTagManifests.currentTagManifests'] ]
condition: ne(variables.TAG, variables.CURRENT_VERSION)
jobs:
- job: timeout_and_cancel
displayName: Cancel Run
pool:
name: $(BUILD_POOL_NAME_DEFAULT)
steps:
- script: |
echo $TAG
echo $CURRENT_VERSION
echo "Checking if branch is up to date with master"
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