@@ -16,7 +16,9 @@ stages:
1616 displayName : CNI, NPM, CNS, CNM
1717 pool :
1818 name : Networking-ContainerNetworking
19- demands : agent.os -equals Linux
19+ demands :
20+ - agent.os -equals Linux
21+ - Role -equals Build
2022
2123 container :
2224 image : " $(BUILD_IMAGE)" # build image set as variable in pipeline runtime for flexibility
@@ -58,11 +60,7 @@ stages:
5860 echo "##vso[task.setvariable variable=StorageID;isOutput=true]$(echo ${BUILD_NUMBER//./-})"
5961 echo "##vso[task.setvariable variable=CommitHash;isOutput=true]$(git rev-parse HEAD)"
6062 echo "##vso[task.setvariable variable=Tag;isOutput=true]$(git describe --tags --always --dirty)"
61- export BRANCH=$(Build.SourceBranchName)
62- echo Building branch $BRANCH from $(Build.SourceBranch)
63- if [[ "$BRANCH" == "master" ]]; then
64- echo "##vso[task.setvariable variable=Tag;isOutput=true]$(git describe --tags --abbrev=0)"
65- fi
63+ echo "##vso[task.setvariable variable=ImageTag;isOutput=true]$(git describe --tags --always --dirty)-test"
6664 workingDirectory: "$(modulePath)"
6765 name: "EnvironmentalVariables"
6866 displayName: "Set environmental variables"
@@ -75,13 +73,12 @@ stages:
7573 go get github.com/axw/gocov/gocov
7674 go get github.com/AlekSi/gocov-xml
7775 go get github.com/matm/gocov-html
76+ go get github.com/rakyll/gotest
7877 workingDirectory: "$(modulePath)"
7978 name: "GoDependencies"
8079 displayName: "Install Go dependencies"
8180
8281 - script : |
83- echo Building in $(pwd)
84- echo Build tag is $(EnvironmentalVariables.Tag)
8582 export GOOS=windows
8683 make all-binaries VERSION=$(EnvironmentalVariables.Tag)
8784 workingDirectory: "$(modulePath)"
@@ -109,11 +106,11 @@ stages:
109106 displayName: "Run Tests"
110107
111108 - script : |
112- make all-binaries VERSION=$(EnvironmentalVariables.Tag)
113- sudo make azure-npm-image VERSION=$(EnvironmentalVariables.Tag)
109+ sudo make hack-images VERSION=$(EnvironmentalVariables.Tag)
110+ sudo make all-images VERSION=$(EnvironmentalVariables.Tag)
114111 workingDirectory: "$(modulePath)"
115- name: "BuildNPMImage "
116- displayName: "Build NPM Image "
112+ name: "BuildImages "
113+ displayName: "Build Images "
117114
118115 - bash : |
119116 export CODECOV_TOKEN=$(CODECOV_TOKEN)
@@ -130,6 +127,12 @@ stages:
130127 docker tag $IMAGE_REGISTRY/azure-npm:$(EnvironmentalVariables.Tag) $IMAGE_REGISTRY/azure-npm:$(EnvironmentalVariables.Tag)-test
131128 docker push $IMAGE_REGISTRY/azure-npm:$(EnvironmentalVariables.Tag)-test
132129
130+ docker tag $IMAGE_REGISTRY/azure-cns:$(EnvironmentalVariables.Tag) $IMAGE_REGISTRY/azure-cns:$(EnvironmentalVariables.Tag)-test
131+ docker push $IMAGE_REGISTRY/azure-cns:$(EnvironmentalVariables.Tag)-test
132+
133+ docker tag $IMAGE_REGISTRY/azure-cni-manager:$(EnvironmentalVariables.Tag) $IMAGE_REGISTRY/azure-cni-manager:$(EnvironmentalVariables.Tag)-test
134+ docker push $IMAGE_REGISTRY/azure-cni-manager:$(EnvironmentalVariables.Tag)-test
135+
133136 function auto-retry()
134137 {
135138 export i="1"
@@ -139,7 +142,10 @@ stages:
139142 printf "Attempt $i/$attempts - " && "$@" && break || sleep 3 && i=$[$i+1] && false
140143 done
141144 }
145+
142146 auto-retry docker pull $IMAGE_REGISTRY/azure-npm:$(EnvironmentalVariables.Tag)-test
147+ auto-retry docker pull $IMAGE_REGISTRY/azure-cns:$(EnvironmentalVariables.Tag)-test
148+ auto-retry docker pull $IMAGE_REGISTRY/azure-cni-manager:$(EnvironmentalVariables.Tag)-test
143149 workingDirectory: "$(modulePath)"
144150 name: "mcrreplication"
145151 displayName: "Push NPM Image and Wait for Repository"
@@ -194,7 +200,13 @@ stages:
194200 displayName : Create artifact storage container
195201 condition : succeeded()
196202
197- - template : e2e-job-template.yaml
203+ - template : singletenancy/aks-swift/e2e-job-template.yaml
204+ parameters :
205+ name : " aks_on_swift_e2e"
206+ displayName : AKS on Swift
207+ pipelineBuildImage : " $(BUILD_IMAGE)"
208+
209+ - template : singletenancy/aks-engine/e2e-job-template.yaml
198210 parameters :
199211 name : " ubuntu_16_04_linux_e2e"
200212 displayName : Ubuntu 16.04
@@ -204,7 +216,7 @@ stages:
204216 clusterDefinitionCniBuildOS : " linux"
205217 clusterDefinitionCniBuildExt : " .tgz"
206218
207- - template : e2e-job-template.yaml
219+ - template : singletenancy/aks-engine/ e2e-job-template.yaml
208220 parameters :
209221 name : " ubuntu_18_04_linux_e2e"
210222 displayName : Ubuntu 18.04
@@ -214,7 +226,7 @@ stages:
214226 clusterDefinitionCniBuildOS : " linux"
215227 clusterDefinitionCniBuildExt : " .tgz"
216228
217- - template : e2e-job-template.yaml
229+ - template : singletenancy/aks-engine/ e2e-job-template.yaml
218230 parameters :
219231 name : " windows_18_09_e2e"
220232 displayName : " Windows 1809"
@@ -224,7 +236,7 @@ stages:
224236 clusterDefinitionCniBuildOS : " windows"
225237 clusterDefinitionCniBuildExt : " .zip"
226238
227- - template : e2e-job-template.yaml
239+ - template : singletenancy/aks-engine/ e2e-job-template.yaml
228240 parameters :
229241 name : " windows_19_03_e2e"
230242 displayName : " Windows 1903"
@@ -237,6 +249,7 @@ stages:
237249 - stage : cleanup
238250 displayName : Cleanup
239251 dependsOn :
252+ - " aks_on_swift_e2e"
240253 - " ubuntu_16_04_linux_e2e"
241254 - " ubuntu_18_04_linux_e2e"
242255 - " windows_18_09_e2e"
@@ -260,5 +273,7 @@ stages:
260273 BUILD_NUMBER=${BUILD_NUMBER//./-}
261274 echo Deleting storage container with name acn-$BUILD_NUMBER and account name $(STORAGE_ACCOUNT_NAME)
262275 az storage container delete -n acn-$BUILD_NUMBER --account-name $(STORAGE_ACCOUNT_NAME)
276+ echo Pruning old docker images...
277+ sudo docker system prune -f
263278 workingDirectory : " $(modulePath)"
264279 displayName : Cleanup remote Azure storage container
0 commit comments