Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
7f97796
add new ipam/dropgz e2e test stage
camrynl Sep 28, 2022
317380d
set test image
camrynl Sep 29, 2022
e7aa1ad
set paths in pipeline.yaml
camrynl Sep 29, 2022
ca93184
set path trigger in ipam-dropgz-job template
camrynl Sep 29, 2022
00076a1
set path as param for ipam-dropgze2e
camrynl Sep 29, 2022
5b16e4a
testing path trigger with branch
camrynl Sep 29, 2022
5d98e22
create submodule pipeline
camrynl Sep 30, 2022
98bd23a
add log in /azure-ipam to test piepline trigger
camrynl Sep 30, 2022
fa961b6
remove build for cni-dropgz image in submodule pipeline
camrynl Sep 30, 2022
b4a635c
create separate swift + cilium ipam/dropgz test stages
camrynl Oct 3, 2022
d047a70
remove commented test bits
camrynl Oct 5, 2022
e855c76
remove commented lines from setup_test.go
camrynl Oct 5, 2022
6e56d32
update paths/triggers and set template parameters
camrynl Oct 5, 2022
36e0646
change cleanup dependsOn
camrynl Oct 5, 2022
a45b24c
test parameter call
camrynl Oct 6, 2022
10bfb52
export parameter
camrynl Oct 6, 2022
83a3607
skip setting testDropgz instead of setting false
camrynl Oct 6, 2022
f807c4b
removing ipam-dropgz templates and focus submod UT on azure-ipam
camrynl Oct 6, 2022
b6d4e33
remove parsing gatewayIP from azure-ipam unit tests
camrynl Oct 6, 2022
16f3e67
update make target test-azure-ipam
camrynl Oct 6, 2022
736cf85
update make target
camrynl Oct 7, 2022
63d3921
only publish test results
camrynl Oct 7, 2022
c2ee39e
omit npm build
camrynl Oct 10, 2022
75d62c7
keep npm build and simplify unit testing stage
camrynl Oct 10, 2022
34da572
adjust cluster naming to avoid resource overlap in pipelines
camrynl Oct 14, 2022
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
7 changes: 6 additions & 1 deletion .pipelines/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -274,18 +274,22 @@ stages:
parameters:
name: $(name)
platforms: $(platforms)

- template: singletenancy/cilium/cilium-e2e-job-template.yaml
parameters:
name: "cilium_e2e"
displayName: Cilium
pipelineBuildImage: "$(BUILD_IMAGE)"
testDropgz: ""
clusterName: "ciliume2e"

- template: singletenancy/aks-swift/e2e-job-template.yaml
parameters:
name: "aks_swift_e2e"
displayName: AKS Swift
pipelineBuildImage: "$(BUILD_IMAGE)"
testDropgz: ""
clusterName: "swifte2e"

- template: singletenancy/aks-engine/e2e-job-template.yaml
parameters:
Expand Down Expand Up @@ -331,6 +335,7 @@ stages:
displayName: Cleanup
dependsOn:
- "aks_swift_e2e"
- "cilium_e2e"
- "ubuntu_18_04_linux_e2e"
- "windows_19_03_e2e"
- "windows_20_04_e2e"
Expand Down
4 changes: 4 additions & 0 deletions .pipelines/singletenancy/aks-swift/e2e-job-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ parameters:
name: ""
displayName: ""
pipelineBuildImage: "$(BUILD_IMAGE)"
testDropgz: ""
clusterName: ""

stages:
- stage: ${{ parameters.name }}
Expand All @@ -26,3 +28,5 @@ stages:
- template: e2e-step-template.yaml
parameters:
name: ${{ parameters.name }}
testDropgz: ${{ parameters.testDropgz }}
clusterName: ${{ parameters.clusterName }}
6 changes: 4 additions & 2 deletions .pipelines/singletenancy/aks-swift/e2e-step-template.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
parameters:
name: ""
testDropgz: ""
clusterName: ""

steps:
- bash: |
Expand Down Expand Up @@ -30,7 +32,7 @@ steps:
mkdir -p ~/.kube/
echo "Create AKS cluster"
make -C ./hack/swift azcfg AZCLI=az
make -C ./hack/swift byocni-up SUB=$(SUB_AZURE_NETWORK_AGENT_TEST) AZCLI=az CLUSTER=swifte2e-$(make revision)
make -C ./hack/swift byocni-up SUB=$(SUB_AZURE_NETWORK_AGENT_TEST) AZCLI=az CLUSTER=${{ parameters.clusterName }}-$(make revision)
echo "Cluster successfully created"
displayName: Create test cluster
condition: succeeded()
Expand All @@ -57,7 +59,7 @@ steps:
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
kubectl cluster-info
kubectl get po -owide -A
sudo -E env "PATH=$PATH" make test-integration CNS_VERSION=$(make cns-version) CNI_DROPGZ_VERSION=$(make cni-dropgz-version) INSTALL_CNS=true INSTALL_AZURE_VNET=true
sudo -E env "PATH=$PATH" make test-integration CNS_VERSION=$(make cns-version) CNI_DROPGZ_VERSION=$(make cni-dropgz-version) INSTALL_CNS=true INSTALL_AZURE_VNET=true TEST_DROPGZ=${{ parameters.testDropgz }}
retryCountOnTaskFailure: 3
name: "aksswifte2e"
displayName: "Run AKS Swift E2E"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ parameters:
name: ""
displayName: ""
pipelineBuildImage: "$(BUILD_IMAGE)"
testDropgz: ""
clusterName: ""

stages:
- stage: ${{ parameters.name }}
Expand All @@ -26,3 +28,5 @@ stages:
- template: cilium-e2e-step-template.yaml
parameters:
name: ${{ parameters.name }}
testDropgz: ${{ parameters.testDropgz }}
clusterName: ${{ parameters.clusterName }}
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
parameters:
name: ""
testDropgz: ""
clusterName: ""

steps:
- bash: |
Expand Down Expand Up @@ -30,7 +32,7 @@ steps:
mkdir -p ~/.kube/
echo "Create AKS cluster"
make -C ./hack/swift azcfg AZCLI=az
make -C ./hack/swift byocni-up SUB=$(SUB_AZURE_NETWORK_AGENT_TEST) AZCLI=az CLUSTER=ciliume2e-$(make revision)
make -C ./hack/swift byocni-up SUB=$(SUB_AZURE_NETWORK_AGENT_TEST) AZCLI=az CLUSTER=${{ parameters.clusterName }}-$(make revision)
echo "Cluster successfully created"
displayName: Create test cluster
condition: succeeded()
Expand Down Expand Up @@ -84,7 +86,7 @@ steps:
- script: |
echo "Start Azilium E2E Tests"
kubectl get po -owide -A
sudo -E env "PATH=$PATH" make test-integration CNS_VERSION=$(make cns-version) CNI_DROPGZ_VERSION=$(make cni-dropgz-version) INSTALL_CNS=true INSTALL_AZILIUM=true
sudo -E env "PATH=$PATH" make test-integration CNS_VERSION=$(make cns-version) CNI_DROPGZ_VERSION=$(make cni-dropgz-version) INSTALL_CNS=true INSTALL_AZILIUM=true TEST_DROPGZ=${{ parameters.testDropgz }}
retryCountOnTaskFailure: 3
name: "aziliumTest"
displayName: "Run Azilium E2E"
Expand Down
279 changes: 279 additions & 0 deletions .pipelines/submodules-pipeline.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,279 @@
pr:
branches:
include:
- master
paths:
include:
- "zapai/*"
- "azure-ipam/*"
- "dropgz/*"
exclude:
- "*"

trigger:
paths:
include:
- "zapai/*"
- "azure-ipam/*"
- "dropgz/*"
exclude:
- "*"
tags:
include:
- "zapai/*"
- "azure-ipam/*"
- "dropgz/*"
exclude:
- "*"

stages:
- stage: setup
displayName: ACN
jobs:
- job: env
displayName: Setup
pool:
name: "$(BUILD_POOL_NAME_DEFAULT)"
steps:
- script: |
BUILD_NUMBER=$(Build.BuildNumber)
echo "##vso[task.setvariable variable=StorageID;isOutput=true]$(echo ${BUILD_NUMBER//./-})"
echo "##vso[task.setvariable variable=Tag;isOutput=true]$(make version)"
echo "##vso[task.setvariable variable=cniVersion;isOutput=true]$(make cni-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"
condition: always()

- stage: test
displayName: Test ACN
dependsOn:
- setup
jobs:
- job: test
displayName: Run Tests
pool:
name: "$(BUILD_POOL_NAME_DEFAULT)"
steps:
- script: |
make tools
sudo -E env "PATH=$PATH" make test-azure-ipam;
retryCountOnTaskFailure: 3
name: "Test"
displayName: "Run Tests"

- stage: binaries
displayName: Build Binaries
dependsOn:
- setup
- test
jobs:
- job: build
displayName: Build Binaries
variables:
STORAGE_ID: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.StorageID'] ]
pool:
name: "$(BUILD_POOL_NAME_DEFAULT)"
steps:
- script: |
make all-binaries-platforms
name: "BuildAllPlatformBinaries"
displayName: "Build all platform binaries"

- 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()

- task: PublishBuildArtifacts@1
inputs:
artifactName: "output"
pathtoPublish: "$(Build.ArtifactStagingDirectory)"
condition: succeeded()

- task: AzureCLI@1
inputs:
azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION)
scriptLocation: "inlineScript"
inlineScript: |
echo Creating storage container with name acn-$(STORAGE_ID) and account name $(STORAGE_ACCOUNT_NAME)
az storage container create -n acn-$(STORAGE_ID) --account-name $(STORAGE_ACCOUNT_NAME) --public-access container
az storage blob upload-batch -d acn-$(STORAGE_ID) -s ./output/bins/ --account-name $(STORAGE_ACCOUNT_NAME)
displayName: Create artifact storage container
condition: succeeded()

- publish: ./test/apimodels/
artifact: clusterdefinitions

- stage: containerize
displayName: Build Images
dependsOn:
- setup
- test
jobs:
- job: containerize_linux_amd64
displayName: Build Images
pool:
name: "$(BUILD_POOL_NAME_LINUX_AMD64)"
strategy:
matrix:
acncli_linux_amd64:
arch: amd64
os: linux
name: acncli
cni_dropgz_test_linux_amd64:
arch: amd64
os: linux
name: cni-dropgz-test
cns_linux_amd64:
arch: amd64
os: linux
name: cns
npm_linux_amd64:
arch: amd64
os: linux
name: npm
steps:
- template: containers/container-template.yaml
parameters:
name: $(name)
os: $(os)
arch: $(arch)
- job: containerize_linux_arm64
displayName: Build Images
variables:
TAG: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.Tag'] ]
pool:
name: "$(BUILD_POOL_NAME_LINUX_ARM64)"
strategy:
matrix:
acncli_linux_arm64:
arch: arm64
os: linux
name: acncli
cni_dropgz_test_linux_arm64:
arch: arm64
os: linux
name: cni-dropgz-test
cns_linux_arm64:
arch: arm64
os: linux
name: cns
npm_linux_arm64:
arch: arm64
os: linux
name: npm
steps:
- template: containers/container-template.yaml
parameters:
name: $(name)
os: $(os)
arch: $(arch)
- job: containerize_windows_amd64
timeoutInMinutes: 120
displayName: Build Images
variables:
TAG: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.Tag'] ]
pool:
name: "$(BUILD_POOL_NAME_WINDOWS_AMD64)"
strategy:
matrix:
cns_windows_amd64:
arch: amd64
name: cns
npm_windows_amd64:
arch: amd64
name: npm
steps:
- template: containers/container-template-windows.yaml
parameters:
name: $(name)
arch: $(arch)
tag: $(TAG)

- stage: publish
displayName: Publish Multiarch Manifests
dependsOn:
- containerize
jobs:
- job: manifest
displayName: Compile Manifests
pool:
name: "$(BUILD_POOL_NAME_DEFAULT)"
strategy:
matrix:
acncli:
name: acncli
platforms: linux/amd64 linux/arm64
cni_dropgz_test:
name: cni-dropgz-test
platforms: linux/amd64 linux/arm64
cns:
name: cns
platforms: linux/amd64 linux/arm64 windows/amd64
npm:
name: npm
platforms: linux/amd64 linux/arm64 windows/amd64
steps:
- template: containers/manifest-template.yaml
parameters:
name: $(name)
platforms: $(platforms)

- template: singletenancy/cilium/cilium-e2e-job-template.yaml
parameters:
name: "cilium_e2e"
displayName: Cilium
pipelineBuildImage: "$(BUILD_IMAGE)"
testDropgz: true
clusterName: "submodules-ciliume2e"

- template: singletenancy/aks-swift/e2e-job-template.yaml
parameters:
name: "aks_swift_e2e"
displayName: AKS Swift
pipelineBuildImage: "$(BUILD_IMAGE)"
testDropgz: true
clusterName: "submodules-swifte2e"

- stage: cleanup
displayName: Cleanup
dependsOn:
- cilium_e2e
- aks_swift_e2e
jobs:
- job: delete_remote_artifacts
displayName: Delete remote artifacts
pool:
name: $(BUILD_POOL_NAME_DEFAULT)
demands: agent.os -equals Linux
steps:
- checkout: none
- task: AzureCLI@1
inputs:
azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION)
scriptLocation: "inlineScript"
inlineScript: |
BUILD_NUMBER=$(Build.BuildNumber)
BUILD_NUMBER=${BUILD_NUMBER//./-}
echo Deleting storage container with name acn-$BUILD_NUMBER and account name $(STORAGE_ACCOUNT_NAME)
az storage container delete -n acn-$BUILD_NUMBER --account-name $(STORAGE_ACCOUNT_NAME)
displayName: Cleanup remote Azure storage container
Loading