484 строки
16 KiB
YAML
484 строки
16 KiB
YAML
parameters:
|
|
|
|
- name: triggerBuildSourceBranch
|
|
type: string
|
|
default: ''
|
|
|
|
- name: triggerBuildReason
|
|
type: string
|
|
default: ''
|
|
|
|
- name: triggerBuildGitRef
|
|
type: string
|
|
default: ''
|
|
|
|
- name: triggerBuildQueuedBy
|
|
type: string
|
|
default: ''
|
|
|
|
|
|
stages:
|
|
- stage: setup
|
|
displayName: ACN
|
|
# Block build start until pre-build validation occurs.
|
|
dependsOn: pre_build
|
|
variables:
|
|
ACN_DIR: $(Build.SourcesDirectory)
|
|
jobs:
|
|
- job: env
|
|
displayName: Setup
|
|
pool:
|
|
isCustom: true
|
|
type: linux
|
|
name: "$(BUILD_POOL_NAME_DEFAULT)"
|
|
steps:
|
|
- checkout: ACNTools
|
|
clean: true
|
|
|
|
- script: |
|
|
# To use the variables below, you must make the respective stage's dependsOn have - setup or it will not retain context of this stage
|
|
BUILD_NUMBER=$(Build.BuildNumber)
|
|
echo "##vso[task.setvariable variable=StorageID;isOutput=true]$(echo ${BUILD_NUMBER//./-})"
|
|
echo "##vso[task.setvariable variable=commitID;isOutput=true]$(echo $(make revision)-$(date "+%d%H%M"))"
|
|
echo "##vso[task.setvariable variable=Tag;isOutput=true]$(make version)"
|
|
echo "##vso[task.setvariable variable=npmVersion;isOutput=true]$(make npm-version)"
|
|
cat /etc/os-release
|
|
uname -a
|
|
sudo chown -R $(whoami):$(whoami) .
|
|
go version
|
|
go env
|
|
which go
|
|
echo $PATH
|
|
name: "EnvironmentalVariables"
|
|
displayName: "Set environmental variables"
|
|
|
|
- template: templates/unit-tests.stages.yaml@ACNTools
|
|
|
|
- ${{ if not(contains(parameters.triggerBuildSourceBranch, 'refs/pull')) }}:
|
|
- stage: binaries
|
|
displayName: Build Binaries
|
|
dependsOn:
|
|
- setup
|
|
- test
|
|
variables:
|
|
ACN_DIR: $(Build.SourcesDirectory)
|
|
jobs:
|
|
- job: build
|
|
displayName: Build Binaries
|
|
variables:
|
|
STORAGE_ID: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.StorageID'] ]
|
|
ob_outputDirectory: $(Build.ArtifactStagingDirectory)
|
|
ob_git_checkout: true
|
|
pool:
|
|
isCustom: true
|
|
type: linux
|
|
name: "$(BUILD_POOL_NAME_DEFAULT)"
|
|
steps:
|
|
- checkout: ACNReviewChanges
|
|
clean: true
|
|
|
|
- script: |
|
|
make ipv6-hp-bpf-lib
|
|
make all-binaries-platforms
|
|
name: "BuildAllPlatformBinaries"
|
|
displayName: "Build all platform binaries"
|
|
workingDirectory: $(ACN_DIR)
|
|
|
|
- script: |
|
|
mkdir -p ./output/bins
|
|
cd ./output
|
|
find . -name '*.tgz' -print -exec mv -t ./bins/ {} +
|
|
find . -name '*.zip' -print -exec mv -t ./bins/ {} +
|
|
shopt -s extglob
|
|
rm -rf !("bins")
|
|
name: "PrepareArtifacts"
|
|
displayName: "Prepare Artifacts"
|
|
|
|
- task: CopyFiles@2
|
|
inputs:
|
|
sourceFolder: "output"
|
|
targetFolder: $(Build.ArtifactStagingDirectory)
|
|
condition: succeeded()
|
|
|
|
- stage: containerize
|
|
displayName: Build Images
|
|
dependsOn:
|
|
- setup
|
|
- test
|
|
variables:
|
|
ACN_DIR: $(Build.SourcesDirectory)
|
|
jobs:
|
|
- job: containerize_amd64
|
|
displayName: Build Images
|
|
pool:
|
|
isCustom: true
|
|
type: linux
|
|
name: "$(BUILD_POOL_NAME_LINUX_AMD64)"
|
|
strategy:
|
|
maxParallel: 4
|
|
matrix:
|
|
azure_ipam_linux_amd64:
|
|
Suffix: azure_ipam_linux_amd64
|
|
arch: amd64
|
|
name: azure-ipam
|
|
os: linux
|
|
azure_ipam_windows_amd64:
|
|
Suffix: azure_ipam_windows_amd64
|
|
arch: amd64
|
|
name: azure-ipam
|
|
os: windows
|
|
cni_linux_amd64:
|
|
Suffix: cni_linux_amd64
|
|
arch: amd64
|
|
name: cni
|
|
os: linux
|
|
cni_windows_amd64:
|
|
Suffix: cni_windows_amd64
|
|
arch: amd64
|
|
name: cni
|
|
os: windows
|
|
cns_linux_amd64:
|
|
Suffix: cns_linux_amd64
|
|
arch: amd64
|
|
name: cns
|
|
os: linux
|
|
cns_windows_amd64:
|
|
Suffix: cns_windows_amd64
|
|
arch: amd64
|
|
name: cns
|
|
os: windows
|
|
ipv6_hp_bpf_linux_amd64:
|
|
Suffix: ipv6_hp_bpf_linux_amd64
|
|
arch: amd64
|
|
name: ipv6-hp-bpf
|
|
os: linux
|
|
npm_linux_amd64:
|
|
Suffix: npm_linux_amd64
|
|
arch: amd64
|
|
name: npm
|
|
os: linux
|
|
npm_windows_amd64:
|
|
Suffix: npm_windows_amd64
|
|
arch: amd64
|
|
name: npm
|
|
os: windows
|
|
variables:
|
|
ob_git_checkout: true
|
|
ob_artifactSuffix: $(Suffix) # this is needed to not collide published artifact containers
|
|
ob_outputDirectory: $(System.ArtifactStagingDirectory)
|
|
steps:
|
|
- checkout: ACNReviewChanges
|
|
clean: true
|
|
|
|
- template: containers/container-template.steps.yaml@ACNTools
|
|
parameters:
|
|
arch: $(arch)
|
|
name: $(name)
|
|
os: $(os)
|
|
|
|
- job: containerize_linux_arm64
|
|
displayName: Build Images
|
|
pool:
|
|
isCustom: true
|
|
type: linux
|
|
name: "$(BUILD_POOL_NAME_LINUX_ARM64)"
|
|
strategy:
|
|
maxParallel: 4
|
|
matrix:
|
|
azure_ipam_linux_arm64:
|
|
arch: arm64
|
|
name: azure-ipam
|
|
os: linux
|
|
Suffix: azure-ipam-linux-arm64
|
|
cni_linux_arm64:
|
|
arch: arm64
|
|
name: cni
|
|
os: linux
|
|
Suffix: cni-linux-arm64
|
|
cns_linux_arm64:
|
|
arch: arm64
|
|
name: cns
|
|
os: linux
|
|
Suffix: cns
|
|
ipv6_hp_bpf_linux_arm64:
|
|
arch: arm64
|
|
name: ipv6-hp-bpf
|
|
os: linux
|
|
Suffix: ipv6-hp-bpf-linux-arm64
|
|
npm_linux_arm64:
|
|
arch: arm64
|
|
name: npm
|
|
os: linux
|
|
Suffix: npm-linux-arm64
|
|
variables:
|
|
STORAGE_ID: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.StorageID'] ]
|
|
ob_outputDirectory: $(Build.ArtifactStagingDirectory)
|
|
ob_git_checkout: true
|
|
ob_artifactSuffix: $(Suffix)
|
|
steps:
|
|
- checkout: ACNReviewChanges
|
|
clean: true
|
|
|
|
- template: containers/container-template.steps.yaml@ACNTools
|
|
parameters:
|
|
arch: $(arch)
|
|
name: $(name)
|
|
os: $(os)
|
|
|
|
|
|
- stage: publish
|
|
displayName: Publish Multiarch Manifests
|
|
dependsOn:
|
|
- containerize
|
|
variables:
|
|
Packaging.EnableSBOMSigning: false
|
|
ACN_DIR: $(Build.SourcesDirectory)
|
|
jobs:
|
|
- job: manifest
|
|
displayName: Compile Manifests
|
|
pool:
|
|
isCustom: true
|
|
type: linux
|
|
name: "$(BUILD_POOL_NAME_DEFAULT)"
|
|
strategy:
|
|
maxParallel: 4
|
|
matrix:
|
|
azure_ipam:
|
|
name: azure-ipam
|
|
platforms: linux/amd64 linux/arm64 windows/amd64
|
|
Suffix: azure-ipam
|
|
cni:
|
|
name: cni
|
|
platforms: linux/amd64 linux/arm64 windows/amd64
|
|
Suffix: cni
|
|
cns:
|
|
name: cns
|
|
platforms: linux/amd64 linux/arm64 windows/amd64
|
|
Suffix: cns
|
|
ipv6_hp_bpf:
|
|
name: ipv6-hp-bpf
|
|
platforms: linux/amd64 linux/arm64
|
|
Suffix: ipv6-hp-bpf
|
|
npm:
|
|
name: npm
|
|
platforms: linux/amd64 linux/arm64 windows/amd64
|
|
Suffix: npm
|
|
variables:
|
|
ob_outputDirectory: $(Build.ArtifactStagingDirectory)
|
|
ob_git_checkout: true
|
|
STORAGE_ID: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.StorageID'] ]
|
|
# this is needed to not collide published artifact containers
|
|
#ob_artifactBaseName: drop_$(Job.StageName)_$(Job.JobName)_
|
|
ob_artifactSuffix: $(Suffix)
|
|
#artifactName: ${{ ob_artifactBaseName }}${{ name }}
|
|
steps:
|
|
- checkout: ACNReviewChanges
|
|
clean: true
|
|
|
|
- template: containers/manifest-template.steps.yaml@ACNTools
|
|
parameters:
|
|
name: $(name)
|
|
platforms: $(platforms)
|
|
|
|
# Cilium Podsubnet E2E tests
|
|
- template: singletenancy/cilium/cilium-e2e.jobs.yaml@ACNTools
|
|
parameters:
|
|
name: "cilium_e2e"
|
|
displayName: Cilium
|
|
clusterType: swift-byocni-nokubeproxy-up
|
|
clusterName: "ciliume2e"
|
|
vmSize: Standard_B2ms
|
|
k8sVersion: ""
|
|
dependsOn: "containerize"
|
|
|
|
# Cilium Overlay E2E tests
|
|
- template: singletenancy/cilium-overlay/cilium-overlay-e2e.jobs.yaml@ACNTools
|
|
parameters:
|
|
name: "cilium_overlay_e2e"
|
|
displayName: Cilium on AKS Overlay
|
|
clusterType: overlay-byocni-nokubeproxy-up
|
|
clusterName: "cilovere2e"
|
|
vmSize: Standard_B2ms
|
|
k8sVersion: ""
|
|
dependsOn: "containerize"
|
|
|
|
# Cilium Dualstack Overlay E2E tests
|
|
- template: singletenancy/cilium-dualstack-overlay/cilium-dualstackoverlay-e2e.jobs.yaml@ACNTools
|
|
parameters:
|
|
name: "cilium_dualstackoverlay_e2e"
|
|
displayName: Cilium on AKS DualStack Overlay
|
|
os: linux
|
|
clusterType: dualstack-byocni-nokubeproxy-up
|
|
clusterName: "cildsovere2e"
|
|
vmSize: Standard_B2ms
|
|
k8sVersion: ""
|
|
dependsOn: "containerize"
|
|
|
|
# Cilium Overlay with hubble E2E tests
|
|
- template: singletenancy/cilium-overlay-withhubble/cilium-overlay-e2e.jobs.yaml@ACNTools
|
|
parameters:
|
|
name: "cilium_h_overlay_e2e"
|
|
displayName: Cilium on AKS Overlay with Hubble
|
|
clusterType: overlay-byocni-nokubeproxy-up
|
|
clusterName: "cilwhleovere2e"
|
|
vmSize: Standard_B2ms
|
|
k8sVersion: ""
|
|
dependsOn: "containerize"
|
|
testHubble: true
|
|
|
|
# Azure Overlay E2E tests
|
|
- template: singletenancy/azure-cni-overlay/azure-cni-overlay-e2e.jobs.yaml@ACNTools
|
|
parameters:
|
|
name: "azure_overlay_e2e"
|
|
displayName: Azure Overlay
|
|
os: linux
|
|
clusterType: overlay-byocni-up
|
|
clusterName: "azovere2e"
|
|
vmSize: Standard_B2ms
|
|
k8sVersion: ""
|
|
dependsOn: "containerize"
|
|
|
|
# AKS Swift E2E tests
|
|
- template: singletenancy/aks-swift/aks-swift-e2e.jobs.yaml@ACNTools
|
|
parameters:
|
|
name: "aks_swift_e2e"
|
|
displayName: AKS Swift Ubuntu
|
|
os: linux
|
|
clusterType: swift-byocni-up
|
|
clusterName: "swifte2e"
|
|
vmSize: Standard_B2ms
|
|
k8sVersion: ""
|
|
dependsOn: "containerize"
|
|
|
|
# AKS Swift Vnet Scale E2E tests
|
|
- template: singletenancy/aks-swift/aks-swift-e2e.jobs.yaml@ACNTools
|
|
parameters:
|
|
name: "aks_swift_vnetscale_e2e"
|
|
displayName: AKS Swift Vnet Scale Ubuntu
|
|
os: linux
|
|
clusterType: vnetscale-swift-byocni-up
|
|
clusterName: "vscaleswifte2e"
|
|
vmSize: Standard_B2ms
|
|
k8sVersion: "1.28"
|
|
dependsOn: "containerize"
|
|
|
|
# CNIv1 E2E tests
|
|
- template: singletenancy/aks/aks-e2e.jobs.yaml@ACNTools
|
|
parameters:
|
|
name: "aks_ubuntu_22_linux_e2e"
|
|
displayName: AKS Ubuntu 22
|
|
arch: "amd64"
|
|
os: "linux"
|
|
clusterType: linux-cniv1-up
|
|
clusterName: "ubuntu22e2e"
|
|
vmSize: Standard_B2s
|
|
k8sVersion: 1.25
|
|
scaleup: 100
|
|
dependsOn: "containerize"
|
|
|
|
- template: singletenancy/aks/aks-e2e.jobs.yaml@ACNTools
|
|
parameters:
|
|
name: "aks_windows_22_e2e"
|
|
displayName: AKS Windows 2022
|
|
arch: amd64
|
|
os: windows
|
|
clusterType: windows-cniv1-up
|
|
clusterName: "win22e2e"
|
|
vmSize: Standard_B2ms
|
|
os_version: "ltsc2022"
|
|
scaleup: 50
|
|
dependsOn: "containerize"
|
|
|
|
# CNI dual stack overlay E2E tests
|
|
- template: singletenancy/dualstack-overlay/dualstackoverlay-e2e.jobs.yaml@ACNTools
|
|
parameters:
|
|
name: "dualstackoverlay_e2e"
|
|
displayName: AKS DualStack Overlay
|
|
os: linux
|
|
clusterType: dualstack-overlay-byocni-up
|
|
clusterName: "dsovere2e"
|
|
vmSize: Standard_B2ms
|
|
dependsOn: "containerize"
|
|
|
|
- stage: delete
|
|
displayName: Delete Clusters
|
|
condition: always()
|
|
dependsOn:
|
|
- setup
|
|
- azure_overlay_e2e
|
|
- 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
|
|
- dualstackoverlay_e2e
|
|
- cilium_dualstackoverlay_e2e
|
|
variables:
|
|
ACN_DIR: $(Build.SourcesDirectory)
|
|
commitID: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.commitID'] ]
|
|
jobs:
|
|
- job: delete
|
|
displayName: Delete Cluster
|
|
pool:
|
|
isCustom: true
|
|
type: linux
|
|
name: "$(BUILD_POOL_NAME_DEFAULT)"
|
|
strategy:
|
|
matrix:
|
|
cilium_e2e:
|
|
name: cilium_e2e
|
|
clusterName: "ciliume2e"
|
|
Suffix: cilium_e2e
|
|
cilium_overlay_e2e:
|
|
name: cilium_overlay_e2e
|
|
clusterName: "cilovere2e"
|
|
Suffix: cilium_overlay_e2e
|
|
cilium_h_overlay_e2e:
|
|
name: cilium_h_overlay_e2e
|
|
clusterName: "cilwhleovere2e"
|
|
Suffix: cilium_h_overlay_e2e
|
|
azure_overlay_e2e:
|
|
name: azure_overlay_e2e
|
|
clusterName: "azovere2e"
|
|
Suffix: azure_overlay_e2e
|
|
aks_swift_e2e:
|
|
name: aks_swift_e2e
|
|
clusterName: "swifte2e"
|
|
Suffix: aks_swift_e2e
|
|
aks_swift_vnetscale_e2e:
|
|
name: aks_swift_vnetscale_e2e
|
|
clusterName: "vscaleswifte2e"
|
|
Suffix: aks_swift_vnetscale_e2e
|
|
aks_ubuntu_22_linux_e2e:
|
|
name: aks_ubuntu_22_linux_e2e
|
|
clusterName: "ubuntu22e2e"
|
|
Suffix: aks_ubuntu_22_linux_e2e
|
|
aks_windows_22_e2e:
|
|
name: aks_windows_22_e2e
|
|
clusterName: "win22e2e"
|
|
Suffix: aks_windows_22_e2e
|
|
dualstackoverlay_e2e:
|
|
name: dualstackoverlay_e2e
|
|
clusterName: "dsovere2e"
|
|
Suffix: dualstackoverlay_e2e
|
|
cilium_dualstackoverlay_e2e:
|
|
name: cilium_dualstackoverlay_e2e
|
|
clusterName: "cildsovere2e"
|
|
Suffix: cilium_dualstackoverlay_e2e
|
|
variables:
|
|
STORAGE_ID: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.StorageID'] ]
|
|
ob_outputDirectory: $(Build.ArtifactStagingDirectory)
|
|
ob_git_checkout: true
|
|
ob_artifactSuffix: $(Suffix) # this is needed to not collide published artifact containers
|
|
steps:
|
|
- checkout: ACNReviewChanges
|
|
clean: true
|
|
|
|
- template: templates/delete-cluster.steps.yaml@ACNTools
|
|
parameters:
|
|
name: $(name)
|
|
clusterName: $(clusterName)-$(commitID)
|
|
region: $(REGION_AKS_CLUSTER_TEST)
|