From 4e500e32cf06524c1f5adcb5194859bba759ea4f Mon Sep 17 00:00:00 2001 From: Mathew Merrick Date: Tue, 7 Apr 2020 00:52:36 +0000 Subject: [PATCH 1/4] update pipeline --- .pipelines/e2e-job-template.yaml | 1 + .pipelines/e2e-step-template.yaml | 10 ++-------- .pipelines/pipeline.yaml | 15 +++++++++------ 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/.pipelines/e2e-job-template.yaml b/.pipelines/e2e-job-template.yaml index 7f9e964f2c..6a550e8911 100644 --- a/.pipelines/e2e-job-template.yaml +++ b/.pipelines/e2e-job-template.yaml @@ -22,6 +22,7 @@ jobs: acnPath: "$(GOPATH)/src/github.com/Azure/azure-container-networking" Tag: $[ dependencies.unit_tests.outputs['EnvironmentalVariables.Tag'] ] CommitHash: $[ dependencies.unit_tests.outputs['EnvironmentalVariables.CommitHash'] ] + StorageID: $[ dependencies.unit_tests.outputs['EnvironmentalVariables.StorageID'] ] CLEANUP_ON_EXIT: true CLEANUP_IF_FAIL: true steps: diff --git a/.pipelines/e2e-step-template.yaml b/.pipelines/e2e-step-template.yaml index f68cae5f27..049ea1763d 100644 --- a/.pipelines/e2e-step-template.yaml +++ b/.pipelines/e2e-step-template.yaml @@ -13,7 +13,6 @@ steps: mkdir -p '$(GOBIN)' mkdir -p '$(GOPATH)/pkg' mkdir -p '$(modulePath)' - go get github.com/onsi/ginkgo/ginkgo go get github.com/onsi/gomega/... @@ -40,14 +39,11 @@ steps: # download binary wget https://github.com/Azure/aks-engine/releases/download/$aksEVersion/aks-engine-$aksEVersion-linux-amd64.tar.gz - mkdir ./bin #extract binary tar -zxvf aks-engine-$aksEVersion-linux-amd64.tar.gz -C bin - mv ./bin/aks-engine-*/* ./bin/ - echo '##vso[task.prependpath]$(GOBIN)' echo '##vso[task.prependpath]$(GOROOT)/bin' name: "GoEnv" @@ -63,7 +59,7 @@ steps: - bash: | ls -lah - export CNI_URL=https://$(ARTIFACT_STORAGE).blob.core.windows.net/acn-$(CommitHash)/azure-vnet-cni-${{ parameters.clusterDefinitionCniBuildOS }}-amd64-$(Tag)${{ parameters.clusterDefinitionCniBuildExt }} + export CNI_URL=https://$(ARTIFACT_STORAGE).blob.core.windows.net/acn-$(StorageID)/azure-vnet-cni-${{ parameters.clusterDefinitionCniBuildOS }}-amd64-$(Tag)${{ parameters.clusterDefinitionCniBuildExt }} export CNI_TYPE=${{ parameters.clusterDefinitionCniTypeKey }} echo CNI type is $CNI_TYPE cat '${{ parameters.clusterDefinition }}' | jq --arg cnikey $CNI_TYPE --arg cniurl $CNI_URL '.properties.orchestratorProfile.kubernetesConfig[$cnikey]= $cniurl' > '${{ parameters.clusterDefinition }}'.tmp # @@ -73,9 +69,7 @@ steps: echo "Running E2E tests against a cluster built with the following API model:" cat '${{ parameters.clusterDefinition }}' cp ${{ parameters.clusterDefinition }} clusterDefinition.json - curl -L https://dl.k8s.io/v1.16.0/kubernetes-client-linux-amd64.tar.gz | tar xvzf - - sudo cp kubernetes/client/bin/kubectl /usr/local/bin/kubectl - sudo cp kubernetes/client/bin/kubectl /usr/local/bin/k + echo '##vso[task.prependpath]$(modulePath)/scripts/' displayName: Configure AKS-Engine workingDirectory: "$(modulePath)" diff --git a/.pipelines/pipeline.yaml b/.pipelines/pipeline.yaml index 80a6496417..e8780c9d33 100644 --- a/.pipelines/pipeline.yaml +++ b/.pipelines/pipeline.yaml @@ -52,6 +52,8 @@ stages: displayName: "Set up the Go environment" - script: | + BUILD_NUMBER=$(Build.BuildNumber) + echo "##vso[task.setvariable variable=StorageID;isOutput=true]$(echo ${BUILD_NUMBER//./-})" echo "##vso[task.setvariable variable=CommitHash;isOutput=true]$(git rev-parse HEAD)" echo "##vso[task.setvariable variable=Tag;isOutput=true]$(git describe --tags --always --dirty)" export BRANCH=$(Build.SourceBranchName) @@ -168,9 +170,9 @@ stages: azureSubscription: $(ARTIFACT_SUBSCRIPTION) scriptLocation: "inlineScript" inlineScript: | - echo Creating storage container with name acn-$(EnvironmentalVariables.CommitHash) and account name $(STORAGE_ACCOUNT_NAME) - az storage container create -n acn-$(EnvironmentalVariables.CommitHash) --account-name $(STORAGE_ACCOUNT_NAME) --public-access container - az storage blob upload-batch -d acn-$(EnvironmentalVariables.CommitHash) -s ./output/ --account-name $(STORAGE_ACCOUNT_NAME) + echo Creating storage container with name acn-$(EnvironmentalVariables.StorageID) and account name $(STORAGE_ACCOUNT_NAME) + az storage container create -n acn-$(EnvironmentalVariables.StorageID) --account-name $(STORAGE_ACCOUNT_NAME) --public-access container + az storage blob upload-batch -d acn-$(EnvironmentalVariables.StorageID) -s ./output/ --account-name $(STORAGE_ACCOUNT_NAME) workingDirectory: "$(modulePath)" displayName: Create artifact storage container condition: succeeded() @@ -226,8 +228,9 @@ stages: azureSubscription: $(ARTIFACT_SUBSCRIPTION) scriptLocation: "inlineScript" inlineScript: | - export CommitHash=$(git rev-parse HEAD) - echo Deleting storage container with name acn-$CommitHash and account name $(STORAGE_ACCOUNT_NAME) - az storage container delete -n acn-$CommitHash --account-name $(STORAGE_ACCOUNT_NAME) + 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) workingDirectory: "$(modulePath)" displayName: Cleanup remote Azure storage container From a0f3848999129c347e99723cf20246cb666679aa Mon Sep 17 00:00:00 2001 From: Mathew Merrick Date: Tue, 7 Apr 2020 17:19:31 +0000 Subject: [PATCH 2/4] update pipeline --- .pipelines/e2e-step-template.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.pipelines/e2e-step-template.yaml b/.pipelines/e2e-step-template.yaml index 049ea1763d..629f81ddce 100644 --- a/.pipelines/e2e-step-template.yaml +++ b/.pipelines/e2e-step-template.yaml @@ -69,7 +69,9 @@ steps: echo "Running E2E tests against a cluster built with the following API model:" cat '${{ parameters.clusterDefinition }}' cp ${{ parameters.clusterDefinition }} clusterDefinition.json - echo '##vso[task.prependpath]$(modulePath)/scripts/' + curl -L https://dl.k8s.io/v1.18.0/kubernetes-client-linux-amd64.tar.gz | tar xvzf - + sudo cp kubernetes/client/bin/kubectl /usr/local/bin/kubectl + sudo cp kubernetes/client/bin/kubectl /usr/local/bin/k displayName: Configure AKS-Engine workingDirectory: "$(modulePath)" From 1771e27d9049087a4485ea1605757bdf96abc976 Mon Sep 17 00:00:00 2001 From: Mathew Merrick Date: Tue, 7 Apr 2020 18:34:25 +0000 Subject: [PATCH 3/4] k8s version 1.17 in test --- .pipelines/e2e-step-template.yaml | 2 +- test/e2e/kubernetes/cniLinux1604.json | 2 +- test/e2e/kubernetes/cniLinux1804.json | 2 +- test/e2e/kubernetes/cniWindows1809.json | 2 +- test/e2e/kubernetes/cniWindows1903.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.pipelines/e2e-step-template.yaml b/.pipelines/e2e-step-template.yaml index 629f81ddce..4ed31441bf 100644 --- a/.pipelines/e2e-step-template.yaml +++ b/.pipelines/e2e-step-template.yaml @@ -69,7 +69,7 @@ steps: echo "Running E2E tests against a cluster built with the following API model:" cat '${{ parameters.clusterDefinition }}' cp ${{ parameters.clusterDefinition }} clusterDefinition.json - curl -L https://dl.k8s.io/v1.18.0/kubernetes-client-linux-amd64.tar.gz | tar xvzf - + curl -L https://dl.k8s.io/v1.17.4/kubernetes-client-linux-amd64.tar.gz | tar xvzf - sudo cp kubernetes/client/bin/kubectl /usr/local/bin/kubectl sudo cp kubernetes/client/bin/kubectl /usr/local/bin/k displayName: Configure AKS-Engine diff --git a/test/e2e/kubernetes/cniLinux1604.json b/test/e2e/kubernetes/cniLinux1604.json index 46d7783e72..d9509d8180 100644 --- a/test/e2e/kubernetes/cniLinux1604.json +++ b/test/e2e/kubernetes/cniLinux1604.json @@ -3,7 +3,7 @@ "properties": { "orchestratorProfile": { "orchestratorType": "Kubernetes", - "orchestratorRelease": "1.16", + "orchestratorRelease": "1.17", "kubernetesConfig": { "networkPlugin": "azure", "networkPolicy": "azure", diff --git a/test/e2e/kubernetes/cniLinux1804.json b/test/e2e/kubernetes/cniLinux1804.json index 096dacefcb..4121e1cec5 100644 --- a/test/e2e/kubernetes/cniLinux1804.json +++ b/test/e2e/kubernetes/cniLinux1804.json @@ -3,7 +3,7 @@ "properties": { "orchestratorProfile": { "orchestratorType": "Kubernetes", - "orchestratorRelease": "1.16", + "orchestratorRelease": "1.17", "kubernetesConfig": { "networkPlugin": "azure", "networkPolicy": "azure", diff --git a/test/e2e/kubernetes/cniWindows1809.json b/test/e2e/kubernetes/cniWindows1809.json index d26f277da0..7be581d0b5 100644 --- a/test/e2e/kubernetes/cniWindows1809.json +++ b/test/e2e/kubernetes/cniWindows1809.json @@ -3,7 +3,7 @@ "properties": { "orchestratorProfile": { "orchestratorType": "Kubernetes", - "orchestratorRelease": "1.16", + "orchestratorRelease": "1.17", "kubernetesConfig": { "networkPlugin": "azure", "networkPolicy": "azure", diff --git a/test/e2e/kubernetes/cniWindows1903.json b/test/e2e/kubernetes/cniWindows1903.json index 25ed53f82f..4d545ecbd8 100644 --- a/test/e2e/kubernetes/cniWindows1903.json +++ b/test/e2e/kubernetes/cniWindows1903.json @@ -3,7 +3,7 @@ "properties": { "orchestratorProfile": { "orchestratorType": "Kubernetes", - "orchestratorRelease": "1.16", + "orchestratorRelease": "1.17", "kubernetesConfig": { "networkPlugin": "azure", "networkPolicy": "azure", From 39fca7920525f598e13f0daaac67fe3705cffec9 Mon Sep 17 00:00:00 2001 From: Mathew Merrick Date: Tue, 7 Apr 2020 20:41:56 +0000 Subject: [PATCH 4/4] update pipeline timeout --- .pipelines/e2e-job-template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pipelines/e2e-job-template.yaml b/.pipelines/e2e-job-template.yaml index 6a550e8911..0ea08d5d04 100644 --- a/.pipelines/e2e-job-template.yaml +++ b/.pipelines/e2e-job-template.yaml @@ -9,7 +9,7 @@ parameters: jobs: - job: ${{ parameters.name }} dependsOn: unit_tests - timeoutInMinutes: 90 + timeoutInMinutes: 120 pool: name: Networking-ContainerNetworking demands: agent.os -equals Linux