From 86f4a5d4410a1c5741b8905dac9ce1e71b73f6cd Mon Sep 17 00:00:00 2001 From: Mathew Merrick Date: Wed, 19 Feb 2020 19:11:29 +0000 Subject: [PATCH 01/23] upgrade packages at image build time --- cns/Dockerfile | 1 + npm/Dockerfile | 1 + 2 files changed, 2 insertions(+) diff --git a/cns/Dockerfile b/cns/Dockerfile index f700297719..ea22b08085 100644 --- a/cns/Dockerfile +++ b/cns/Dockerfile @@ -10,6 +10,7 @@ RUN apt-get update && \ apt-get install -y ca-certificates && \ tar -xvzf azure-cns.tgz && \ rm azure-cns.tgz +RUN apt-get upgrade -y EXPOSE 10090 diff --git a/npm/Dockerfile b/npm/Dockerfile index cadd7200c1..9d7db2e3f4 100644 --- a/npm/Dockerfile +++ b/npm/Dockerfile @@ -7,6 +7,7 @@ RUN apt-get update RUN apt-get install -y iptables RUN apt-get install -y ipset RUN apt-get install -y ca-certificates +RUN apt-get upgrade -y # Install plugin. COPY $NPM_BUILD_DIR/azure-npm /usr/bin From 160d634a82714ff90f8a8170ce181e65a51262da Mon Sep 17 00:00:00 2001 From: Mathew Merrick Date: Thu, 20 Feb 2020 00:57:21 +0000 Subject: [PATCH 02/23] update pipeline to use MCR --- .pipelines/e2e-step-template.yaml | 4 +++- .pipelines/pipeline.yaml | 20 +++++++++++++++++--- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/.pipelines/e2e-step-template.yaml b/.pipelines/e2e-step-template.yaml index 9726b7c608..c1b07e62af 100644 --- a/.pipelines/e2e-step-template.yaml +++ b/.pipelines/e2e-step-template.yaml @@ -92,7 +92,7 @@ steps: export CLEANUP_ON_EXIT=true export REGIONS=$(AKS_ENGINE_REGION) export IS_JENKINS=false - make test-kubernetes + sudo make test-kubernetes name: DeployAKSEngine displayName: Run AKS-Engine E2E Tests workingDirectory: "$(modulePath)" @@ -101,9 +101,11 @@ steps: mkdir -p $(Build.ArtifactStagingDirectory)/kube-${{ parameters.name }} cp -r _output/k*/kubeconfig/kubeconfig.$REGIONS.json $(Build.ArtifactStagingDirectory)/kube-${{ parameters.name }} cp -r _output/kubernetes-*-ssh $(Build.ArtifactStagingDirectory)/kube-${{ parameters.name }} + cp -r test/e2e/kubernetes/junit.xml $(Build.ArtifactStagingDirectory)/kube-${{ parameters.name }} name: CopyKubeConfigsAKSEngine displayName: Save cluster configs workingDirectory: "$(modulePath)" + condition: always() - task: PublishBuildArtifacts@1 inputs: diff --git a/.pipelines/pipeline.yaml b/.pipelines/pipeline.yaml index ef596228ef..72a5431a0b 100644 --- a/.pipelines/pipeline.yaml +++ b/.pipelines/pipeline.yaml @@ -84,9 +84,8 @@ stages: export GOOS=linux make all-binaries VERSION=$(EnvironmentalVariables.Tag) sudo make azure-npm-image VERSION=$(EnvironmentalVariables.Tag) - echo '$(DOCKER_PASSWORD)' | docker login -u '$(DOCKER_USERNAME)' --password-stdin - docker tag containernetworking.azurecr.io/public/containernetworking/azure-npm:$(EnvironmentalVariables.Tag) containernetworking/azure-npm:$(EnvironmentalVariables.Tag) - docker push containernetworking/azure-npm:$(EnvironmentalVariables.Tag) + echo '$(DOCKER_PASSWORD)' | docker login containernetworking.azurecr.io -u '$(DOCKER_USERNAME)' --password-stdin + docker push containernetworking.azurecr.io/public/containernetworking/azure-npm:$(EnvironmentalVariables.Tag) cd output sudo find . -mindepth 2 -type f -regextype posix-extended ! -iregex '.*\.(zip|tgz)$' -delete sudo find . -mindepth 2 -type f -print -exec mv {} . \; @@ -119,6 +118,21 @@ stages: displayName: "Generate Coverage Reports" condition: always() + - script: | + function auto-retry() + { + export i="1" + export attempts="60" + false + while [[ $? -ne 0 ]] && [[ $i -lt $attempts ]]; do + printf "Attempt $i/$attempts - " && "$@" && break || sleep 3 && i=$[$i+1] && false + done + } + auto-retry docker pull containernetworking.azurecr.io/public/containernetworking/azure-npm:$(EnvironmentalVariables.Tag) + workingDirectory: "$(modulePath)" + name: "mcrreplication" + displayName: "Wait for MCR" + - task: PublishTestResults@2 inputs: testRunner: JUnit From 96f9fac358139b8edd1b95585e640897b2a3faa9 Mon Sep 17 00:00:00 2001 From: Mathew Merrick Date: Thu, 20 Feb 2020 18:30:47 +0000 Subject: [PATCH 03/23] use mcr --- .pipelines/pipeline.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pipelines/pipeline.yaml b/.pipelines/pipeline.yaml index 72a5431a0b..78a04c7cb6 100644 --- a/.pipelines/pipeline.yaml +++ b/.pipelines/pipeline.yaml @@ -122,13 +122,13 @@ stages: function auto-retry() { export i="1" - export attempts="60" + export attempts="100" false while [[ $? -ne 0 ]] && [[ $i -lt $attempts ]]; do printf "Attempt $i/$attempts - " && "$@" && break || sleep 3 && i=$[$i+1] && false done } - auto-retry docker pull containernetworking.azurecr.io/public/containernetworking/azure-npm:$(EnvironmentalVariables.Tag) + auto-retry docker pull mcr.microsoft.com/containernetworking/azure-npm:$(EnvironmentalVariables.Tag) workingDirectory: "$(modulePath)" name: "mcrreplication" displayName: "Wait for MCR" From e2c78cd1da692f342c2e36d33750f48bce9e9061 Mon Sep 17 00:00:00 2001 From: Mathew Merrick Date: Thu, 20 Feb 2020 19:17:05 +0000 Subject: [PATCH 04/23] use mcr --- .pipelines/pipeline.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.pipelines/pipeline.yaml b/.pipelines/pipeline.yaml index 78a04c7cb6..18037511ba 100644 --- a/.pipelines/pipeline.yaml +++ b/.pipelines/pipeline.yaml @@ -227,6 +227,7 @@ stages: inlineScript: | export CommitHash=(git rev-parse HEAD) az storage container delete -n acn-$CommitHash --account-name $(STORAGE_ACCOUNT_NAME) + az acr repository delete --name containernetworking --image containernetworking.azurecr.io/public/containernetworking/azure-npm:$(EnvironmentalVariables.Tag) workingDirectory: "$(modulePath)" displayName: Cleanup remote Azure storage container condition: always() From f7cf078b6faee8f7fbdc56088fb6f13f862ceedc Mon Sep 17 00:00:00 2001 From: Mathew Merrick Date: Thu, 20 Feb 2020 19:24:27 +0000 Subject: [PATCH 05/23] use mcr --- .pipelines/e2e-step-template.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pipelines/e2e-step-template.yaml b/.pipelines/e2e-step-template.yaml index c1b07e62af..e487198842 100644 --- a/.pipelines/e2e-step-template.yaml +++ b/.pipelines/e2e-step-template.yaml @@ -68,7 +68,7 @@ steps: 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 # cat '${{ parameters.clusterDefinition }}'.tmp | jq --arg tag $(Tag) '.properties.orchestratorProfile.kubernetesConfig.azureCNIVersion = $tag' > '${{ parameters.clusterDefinition }}' - cat '${{ parameters.clusterDefinition }}' | jq --arg npmimage containernetworking/azure-npm:$(Tag) '.properties.orchestratorProfile.kubernetesConfig.addons[0].containers[0].image = $npmimage' > '${{ parameters.clusterDefinition }}'.tmp + cat '${{ parameters.clusterDefinition }}' | jq --arg npmimage mcr.microsoft.com/containernetworking/azure-npm:$(Tag) '.properties.orchestratorProfile.kubernetesConfig.addons[0].containers[0].image = $npmimage' > '${{ parameters.clusterDefinition }}'.tmp mv '${{ parameters.clusterDefinition }}'.tmp '${{ parameters.clusterDefinition }}' echo "Running E2E tests against a cluster built with the following API model:" cat '${{ parameters.clusterDefinition }}' @@ -92,7 +92,7 @@ steps: export CLEANUP_ON_EXIT=true export REGIONS=$(AKS_ENGINE_REGION) export IS_JENKINS=false - sudo make test-kubernetes + make test-kubernetes name: DeployAKSEngine displayName: Run AKS-Engine E2E Tests workingDirectory: "$(modulePath)" From 2c77c92532f2fcc40a55c8a88bc838d10db378fa Mon Sep 17 00:00:00 2001 From: Mathew Merrick Date: Thu, 20 Feb 2020 19:39:02 +0000 Subject: [PATCH 06/23] use mcr --- .pipelines/e2e-step-template.yaml | 2 +- .pipelines/pipeline.yaml | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.pipelines/e2e-step-template.yaml b/.pipelines/e2e-step-template.yaml index e487198842..4664472e53 100644 --- a/.pipelines/e2e-step-template.yaml +++ b/.pipelines/e2e-step-template.yaml @@ -68,7 +68,7 @@ steps: 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 # cat '${{ parameters.clusterDefinition }}'.tmp | jq --arg tag $(Tag) '.properties.orchestratorProfile.kubernetesConfig.azureCNIVersion = $tag' > '${{ parameters.clusterDefinition }}' - cat '${{ parameters.clusterDefinition }}' | jq --arg npmimage mcr.microsoft.com/containernetworking/azure-npm:$(Tag) '.properties.orchestratorProfile.kubernetesConfig.addons[0].containers[0].image = $npmimage' > '${{ parameters.clusterDefinition }}'.tmp + cat '${{ parameters.clusterDefinition }}' | jq --arg npmimage mcr.microsoft.com/containernetworking/azure-npm:$(Tag)-test '.properties.orchestratorProfile.kubernetesConfig.addons[0].containers[0].image = $npmimage' > '${{ parameters.clusterDefinition }}'.tmp mv '${{ parameters.clusterDefinition }}'.tmp '${{ parameters.clusterDefinition }}' echo "Running E2E tests against a cluster built with the following API model:" cat '${{ parameters.clusterDefinition }}' diff --git a/.pipelines/pipeline.yaml b/.pipelines/pipeline.yaml index 18037511ba..3090d36924 100644 --- a/.pipelines/pipeline.yaml +++ b/.pipelines/pipeline.yaml @@ -85,7 +85,8 @@ stages: make all-binaries VERSION=$(EnvironmentalVariables.Tag) sudo make azure-npm-image VERSION=$(EnvironmentalVariables.Tag) echo '$(DOCKER_PASSWORD)' | docker login containernetworking.azurecr.io -u '$(DOCKER_USERNAME)' --password-stdin - docker push containernetworking.azurecr.io/public/containernetworking/azure-npm:$(EnvironmentalVariables.Tag) + docker tag containernetworking.azurecr.io/public/containernetworking/azure-npm:$(EnvironmentalVariables.Tag) containernetworking.azurecr.io/public/containernetworking/azure-npm:$(EnvironmentalVariables.Tag)-test + docker push containernetworking.azurecr.io/public/containernetworking/azure-npm:$(EnvironmentalVariables.Tag)-test cd output sudo find . -mindepth 2 -type f -regextype posix-extended ! -iregex '.*\.(zip|tgz)$' -delete sudo find . -mindepth 2 -type f -print -exec mv {} . \; @@ -128,7 +129,7 @@ stages: printf "Attempt $i/$attempts - " && "$@" && break || sleep 3 && i=$[$i+1] && false done } - auto-retry docker pull mcr.microsoft.com/containernetworking/azure-npm:$(EnvironmentalVariables.Tag) + auto-retry docker pull mcr.microsoft.com/containernetworking/azure-npm:$(EnvironmentalVariables.Tag)-test workingDirectory: "$(modulePath)" name: "mcrreplication" displayName: "Wait for MCR" From df0d664f74197bee313f2e5bdd0c649be1178845 Mon Sep 17 00:00:00 2001 From: Mathew Merrick Date: Thu, 20 Feb 2020 19:47:23 +0000 Subject: [PATCH 07/23] use mcr --- .pipelines/pipeline.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pipelines/pipeline.yaml b/.pipelines/pipeline.yaml index 3090d36924..4217050c21 100644 --- a/.pipelines/pipeline.yaml +++ b/.pipelines/pipeline.yaml @@ -123,7 +123,7 @@ stages: function auto-retry() { export i="1" - export attempts="100" + export attempts="300" false while [[ $? -ne 0 ]] && [[ $i -lt $attempts ]]; do printf "Attempt $i/$attempts - " && "$@" && break || sleep 3 && i=$[$i+1] && false @@ -228,7 +228,7 @@ stages: inlineScript: | export CommitHash=(git rev-parse HEAD) az storage container delete -n acn-$CommitHash --account-name $(STORAGE_ACCOUNT_NAME) - az acr repository delete --name containernetworking --image containernetworking.azurecr.io/public/containernetworking/azure-npm:$(EnvironmentalVariables.Tag) + az acr repository delete --name containernetworking --image containernetworking.azurecr.io/public/containernetworking/azure-npm:$(EnvironmentalVariables.Tag)-test workingDirectory: "$(modulePath)" displayName: Cleanup remote Azure storage container condition: always() From b08f159f51bbb8c80f11947f123b29017c0d9e52 Mon Sep 17 00:00:00 2001 From: Mathew Merrick Date: Thu, 20 Feb 2020 19:49:17 +0000 Subject: [PATCH 08/23] use mcr --- .pipelines/pipeline.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pipelines/pipeline.yaml b/.pipelines/pipeline.yaml index 4217050c21..c3298e0175 100644 --- a/.pipelines/pipeline.yaml +++ b/.pipelines/pipeline.yaml @@ -228,7 +228,7 @@ stages: inlineScript: | export CommitHash=(git rev-parse HEAD) az storage container delete -n acn-$CommitHash --account-name $(STORAGE_ACCOUNT_NAME) - az acr repository delete --name containernetworking --image containernetworking.azurecr.io/public/containernetworking/azure-npm:$(EnvironmentalVariables.Tag)-test + az acr repository delete --name containernetworking --image containernetworking.azurecr.io/public/containernetworking/azure-npm:$(Tag)-test workingDirectory: "$(modulePath)" displayName: Cleanup remote Azure storage container condition: always() From eba2d76c9f8ad330c4b6dbdf25b350dd6e13f64e Mon Sep 17 00:00:00 2001 From: Mathew Merrick Date: Thu, 20 Feb 2020 22:40:33 +0000 Subject: [PATCH 09/23] env --- .pipelines/pipeline.yaml | 73 ++++++++++++++++++++-------------------- 1 file changed, 37 insertions(+), 36 deletions(-) diff --git a/.pipelines/pipeline.yaml b/.pipelines/pipeline.yaml index c3298e0175..39951547b8 100644 --- a/.pipelines/pipeline.yaml +++ b/.pipelines/pipeline.yaml @@ -171,41 +171,41 @@ stages: workingDirectory: "$(modulePath)" displayName: Create artifact storage container - - template: e2e-job-template.yaml - parameters: - name: "ubuntu_16_04_linux_e2e" - pipelineBuildImage: "containernetworking/pipeline-ci:1.0.6" - clusterDefinition: "cniLinux1604.json" - clusterDefinitionCniTypeKey: "azureCNIURLLinux" - clusterDefinitionCniBuildOS: "linux" - clusterDefinitionCniBuildExt: ".tgz" - - - template: e2e-job-template.yaml - parameters: - name: "ubuntu_18_04_linux_e2e" - pipelineBuildImage: "containernetworking/pipeline-ci:1.0.6" - clusterDefinition: "cniLinux1804.json" - clusterDefinitionCniTypeKey: "azureCNIURLLinux" - clusterDefinitionCniBuildOS: "linux" - clusterDefinitionCniBuildExt: ".tgz" - - - template: e2e-job-template.yaml - parameters: - name: "windows_18_09_e2e" - pipelineBuildImage: "containernetworking/pipeline-ci:1.0.6" - clusterDefinition: "cniWindows1809.json" - clusterDefinitionCniTypeKey: "azureCNIURLWindows" - clusterDefinitionCniBuildOS: "windows" - clusterDefinitionCniBuildExt: ".zip" - - - template: e2e-job-template.yaml - parameters: - name: "windows_19_03_e2e" - pipelineBuildImage: "containernetworking/pipeline-ci:1.0.6" - clusterDefinition: "cniWindows1903.json" - clusterDefinitionCniTypeKey: "azureCNIURLWindows" - clusterDefinitionCniBuildOS: "windows" - clusterDefinitionCniBuildExt: ".zip" + # - template: e2e-job-template.yaml + # parameters: + # name: "ubuntu_16_04_linux_e2e" + # pipelineBuildImage: "containernetworking/pipeline-ci:1.0.6" + # clusterDefinition: "cniLinux1604.json" + # clusterDefinitionCniTypeKey: "azureCNIURLLinux" + # clusterDefinitionCniBuildOS: "linux" + # clusterDefinitionCniBuildExt: ".tgz" + # + # - template: e2e-job-template.yaml + # parameters: + # name: "ubuntu_18_04_linux_e2e" + # pipelineBuildImage: "containernetworking/pipeline-ci:1.0.6" + # clusterDefinition: "cniLinux1804.json" + # clusterDefinitionCniTypeKey: "azureCNIURLLinux" + # clusterDefinitionCniBuildOS: "linux" + # clusterDefinitionCniBuildExt: ".tgz" + # + # - template: e2e-job-template.yaml + # parameters: + # name: "windows_18_09_e2e" + # pipelineBuildImage: "containernetworking/pipeline-ci:1.0.6" + # clusterDefinition: "cniWindows1809.json" + # clusterDefinitionCniTypeKey: "azureCNIURLWindows" + # clusterDefinitionCniBuildOS: "windows" + # clusterDefinitionCniBuildExt: ".zip" + # + # - template: e2e-job-template.yaml + # parameters: + # name: "windows_19_03_e2e" + # pipelineBuildImage: "containernetworking/pipeline-ci:1.0.6" + # clusterDefinition: "cniWindows1903.json" + # clusterDefinitionCniTypeKey: "azureCNIURLWindows" + # clusterDefinitionCniBuildOS: "windows" + # clusterDefinitionCniBuildExt: ".zip" - stage: cleanup condition: always() @@ -217,7 +217,7 @@ stages: container: image: containernetworking/pipeline-ci:1.0.6 variables: - Tag: $[ dependencies.unit_tests.outputs['EnvironmentalVariables.Tag'] ] + Tag: $[ build_and_test.unit_tests.outputs['EnvironmentalVariables.Tag'] ] condition: always() steps: - checkout: none @@ -227,6 +227,7 @@ stages: scriptLocation: "inlineScript" inlineScript: | export CommitHash=(git rev-parse HEAD) + echo Tag is $(Tag) az storage container delete -n acn-$CommitHash --account-name $(STORAGE_ACCOUNT_NAME) az acr repository delete --name containernetworking --image containernetworking.azurecr.io/public/containernetworking/azure-npm:$(Tag)-test workingDirectory: "$(modulePath)" From e578e008794c5dd997eb1f32a81ef2a989c4f08b Mon Sep 17 00:00:00 2001 From: Mathew Merrick Date: Thu, 20 Feb 2020 22:52:39 +0000 Subject: [PATCH 10/23] env --- .pipelines/e2e-step-template.yaml | 2 +- .pipelines/pipeline.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pipelines/e2e-step-template.yaml b/.pipelines/e2e-step-template.yaml index 4664472e53..3b917a6fe0 100644 --- a/.pipelines/e2e-step-template.yaml +++ b/.pipelines/e2e-step-template.yaml @@ -68,7 +68,7 @@ steps: 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 # cat '${{ parameters.clusterDefinition }}'.tmp | jq --arg tag $(Tag) '.properties.orchestratorProfile.kubernetesConfig.azureCNIVersion = $tag' > '${{ parameters.clusterDefinition }}' - cat '${{ parameters.clusterDefinition }}' | jq --arg npmimage mcr.microsoft.com/containernetworking/azure-npm:$(Tag)-test '.properties.orchestratorProfile.kubernetesConfig.addons[0].containers[0].image = $npmimage' > '${{ parameters.clusterDefinition }}'.tmp + cat '${{ parameters.clusterDefinition }}' | jq --arg npmimage $PULL_CONTAINER_REGISTRY/azure-npm:$(Tag)-test '.properties.orchestratorProfile.kubernetesConfig.addons[0].containers[0].image = $npmimage' > '${{ parameters.clusterDefinition }}'.tmp mv '${{ parameters.clusterDefinition }}'.tmp '${{ parameters.clusterDefinition }}' echo "Running E2E tests against a cluster built with the following API model:" cat '${{ parameters.clusterDefinition }}' diff --git a/.pipelines/pipeline.yaml b/.pipelines/pipeline.yaml index 39951547b8..fd3b7e9b3e 100644 --- a/.pipelines/pipeline.yaml +++ b/.pipelines/pipeline.yaml @@ -85,8 +85,8 @@ stages: make all-binaries VERSION=$(EnvironmentalVariables.Tag) sudo make azure-npm-image VERSION=$(EnvironmentalVariables.Tag) echo '$(DOCKER_PASSWORD)' | docker login containernetworking.azurecr.io -u '$(DOCKER_USERNAME)' --password-stdin - docker tag containernetworking.azurecr.io/public/containernetworking/azure-npm:$(EnvironmentalVariables.Tag) containernetworking.azurecr.io/public/containernetworking/azure-npm:$(EnvironmentalVariables.Tag)-test - docker push containernetworking.azurecr.io/public/containernetworking/azure-npm:$(EnvironmentalVariables.Tag)-test + docker tag $PUSH_CONTAINER_REGISTRY/azure-npm:$(EnvironmentalVariables.Tag) $PUSH_CONTAINER_REGISTRY/azure-npm:$(EnvironmentalVariables.Tag)-test + docker push $PUSH_CONTAINER_REGISTRY/azure-npm:$(EnvironmentalVariables.Tag)-test cd output sudo find . -mindepth 2 -type f -regextype posix-extended ! -iregex '.*\.(zip|tgz)$' -delete sudo find . -mindepth 2 -type f -print -exec mv {} . \; From 00264460708e2ba624a6ff6e7866a143b47445e1 Mon Sep 17 00:00:00 2001 From: Mathew Merrick Date: Fri, 21 Feb 2020 18:20:02 +0000 Subject: [PATCH 11/23] update pipeline --- .pipelines/pipeline.yaml | 70 ++++++++++++++++++++-------------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/.pipelines/pipeline.yaml b/.pipelines/pipeline.yaml index fd3b7e9b3e..cef04be14b 100644 --- a/.pipelines/pipeline.yaml +++ b/.pipelines/pipeline.yaml @@ -171,41 +171,41 @@ stages: workingDirectory: "$(modulePath)" displayName: Create artifact storage container - # - template: e2e-job-template.yaml - # parameters: - # name: "ubuntu_16_04_linux_e2e" - # pipelineBuildImage: "containernetworking/pipeline-ci:1.0.6" - # clusterDefinition: "cniLinux1604.json" - # clusterDefinitionCniTypeKey: "azureCNIURLLinux" - # clusterDefinitionCniBuildOS: "linux" - # clusterDefinitionCniBuildExt: ".tgz" - # - # - template: e2e-job-template.yaml - # parameters: - # name: "ubuntu_18_04_linux_e2e" - # pipelineBuildImage: "containernetworking/pipeline-ci:1.0.6" - # clusterDefinition: "cniLinux1804.json" - # clusterDefinitionCniTypeKey: "azureCNIURLLinux" - # clusterDefinitionCniBuildOS: "linux" - # clusterDefinitionCniBuildExt: ".tgz" - # - # - template: e2e-job-template.yaml - # parameters: - # name: "windows_18_09_e2e" - # pipelineBuildImage: "containernetworking/pipeline-ci:1.0.6" - # clusterDefinition: "cniWindows1809.json" - # clusterDefinitionCniTypeKey: "azureCNIURLWindows" - # clusterDefinitionCniBuildOS: "windows" - # clusterDefinitionCniBuildExt: ".zip" - # - # - template: e2e-job-template.yaml - # parameters: - # name: "windows_19_03_e2e" - # pipelineBuildImage: "containernetworking/pipeline-ci:1.0.6" - # clusterDefinition: "cniWindows1903.json" - # clusterDefinitionCniTypeKey: "azureCNIURLWindows" - # clusterDefinitionCniBuildOS: "windows" - # clusterDefinitionCniBuildExt: ".zip" + - template: e2e-job-template.yaml + parameters: + name: "ubuntu_16_04_linux_e2e" + pipelineBuildImage: "containernetworking/pipeline-ci:1.0.6" + clusterDefinition: "cniLinux1604.json" + clusterDefinitionCniTypeKey: "azureCNIURLLinux" + clusterDefinitionCniBuildOS: "linux" + clusterDefinitionCniBuildExt: ".tgz" + + - template: e2e-job-template.yaml + parameters: + name: "ubuntu_18_04_linux_e2e" + pipelineBuildImage: "containernetworking/pipeline-ci:1.0.6" + clusterDefinition: "cniLinux1804.json" + clusterDefinitionCniTypeKey: "azureCNIURLLinux" + clusterDefinitionCniBuildOS: "linux" + clusterDefinitionCniBuildExt: ".tgz" + + - template: e2e-job-template.yaml + parameters: + name: "windows_18_09_e2e" + pipelineBuildImage: "containernetworking/pipeline-ci:1.0.6" + clusterDefinition: "cniWindows1809.json" + clusterDefinitionCniTypeKey: "azureCNIURLWindows" + clusterDefinitionCniBuildOS: "windows" + clusterDefinitionCniBuildExt: ".zip" + + - template: e2e-job-template.yaml + parameters: + name: "windows_19_03_e2e" + pipelineBuildImage: "containernetworking/pipeline-ci:1.0.6" + clusterDefinition: "cniWindows1903.json" + clusterDefinitionCniTypeKey: "azureCNIURLWindows" + clusterDefinitionCniBuildOS: "windows" + clusterDefinitionCniBuildExt: ".zip" - stage: cleanup condition: always() From 81478099035c0c7d6012c7970d9f309bc0461250 Mon Sep 17 00:00:00 2001 From: Mathew Merrick Date: Fri, 21 Feb 2020 18:22:39 +0000 Subject: [PATCH 12/23] update pipeline --- .pipelines/pipeline.yaml | 70 ++++++++++++++++++++-------------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/.pipelines/pipeline.yaml b/.pipelines/pipeline.yaml index cef04be14b..36a47af537 100644 --- a/.pipelines/pipeline.yaml +++ b/.pipelines/pipeline.yaml @@ -171,41 +171,41 @@ stages: workingDirectory: "$(modulePath)" displayName: Create artifact storage container - - template: e2e-job-template.yaml - parameters: - name: "ubuntu_16_04_linux_e2e" - pipelineBuildImage: "containernetworking/pipeline-ci:1.0.6" - clusterDefinition: "cniLinux1604.json" - clusterDefinitionCniTypeKey: "azureCNIURLLinux" - clusterDefinitionCniBuildOS: "linux" - clusterDefinitionCniBuildExt: ".tgz" - - - template: e2e-job-template.yaml - parameters: - name: "ubuntu_18_04_linux_e2e" - pipelineBuildImage: "containernetworking/pipeline-ci:1.0.6" - clusterDefinition: "cniLinux1804.json" - clusterDefinitionCniTypeKey: "azureCNIURLLinux" - clusterDefinitionCniBuildOS: "linux" - clusterDefinitionCniBuildExt: ".tgz" - - - template: e2e-job-template.yaml - parameters: - name: "windows_18_09_e2e" - pipelineBuildImage: "containernetworking/pipeline-ci:1.0.6" - clusterDefinition: "cniWindows1809.json" - clusterDefinitionCniTypeKey: "azureCNIURLWindows" - clusterDefinitionCniBuildOS: "windows" - clusterDefinitionCniBuildExt: ".zip" - - - template: e2e-job-template.yaml - parameters: - name: "windows_19_03_e2e" - pipelineBuildImage: "containernetworking/pipeline-ci:1.0.6" - clusterDefinition: "cniWindows1903.json" - clusterDefinitionCniTypeKey: "azureCNIURLWindows" - clusterDefinitionCniBuildOS: "windows" - clusterDefinitionCniBuildExt: ".zip" + - template: e2e-job-template.yaml + parameters: + name: "ubuntu_16_04_linux_e2e" + pipelineBuildImage: "containernetworking/pipeline-ci:1.0.6" + clusterDefinition: "cniLinux1604.json" + clusterDefinitionCniTypeKey: "azureCNIURLLinux" + clusterDefinitionCniBuildOS: "linux" + clusterDefinitionCniBuildExt: ".tgz" + + - template: e2e-job-template.yaml + parameters: + name: "ubuntu_18_04_linux_e2e" + pipelineBuildImage: "containernetworking/pipeline-ci:1.0.6" + clusterDefinition: "cniLinux1804.json" + clusterDefinitionCniTypeKey: "azureCNIURLLinux" + clusterDefinitionCniBuildOS: "linux" + clusterDefinitionCniBuildExt: ".tgz" + + - template: e2e-job-template.yaml + parameters: + name: "windows_18_09_e2e" + pipelineBuildImage: "containernetworking/pipeline-ci:1.0.6" + clusterDefinition: "cniWindows1809.json" + clusterDefinitionCniTypeKey: "azureCNIURLWindows" + clusterDefinitionCniBuildOS: "windows" + clusterDefinitionCniBuildExt: ".zip" + + - template: e2e-job-template.yaml + parameters: + name: "windows_19_03_e2e" + pipelineBuildImage: "containernetworking/pipeline-ci:1.0.6" + clusterDefinition: "cniWindows1903.json" + clusterDefinitionCniTypeKey: "azureCNIURLWindows" + clusterDefinitionCniBuildOS: "windows" + clusterDefinitionCniBuildExt: ".zip" - stage: cleanup condition: always() From d86a615082c04f40f3f3e9e27a8e7bf5f620dd6f Mon Sep 17 00:00:00 2001 From: Mathew Merrick Date: Fri, 21 Feb 2020 18:41:37 +0000 Subject: [PATCH 13/23] update pipeline --- .pipelines/pipeline.yaml | 70 ++++++++++++++++++++-------------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/.pipelines/pipeline.yaml b/.pipelines/pipeline.yaml index 36a47af537..fd3b7e9b3e 100644 --- a/.pipelines/pipeline.yaml +++ b/.pipelines/pipeline.yaml @@ -171,41 +171,41 @@ stages: workingDirectory: "$(modulePath)" displayName: Create artifact storage container - - template: e2e-job-template.yaml - parameters: - name: "ubuntu_16_04_linux_e2e" - pipelineBuildImage: "containernetworking/pipeline-ci:1.0.6" - clusterDefinition: "cniLinux1604.json" - clusterDefinitionCniTypeKey: "azureCNIURLLinux" - clusterDefinitionCniBuildOS: "linux" - clusterDefinitionCniBuildExt: ".tgz" - - - template: e2e-job-template.yaml - parameters: - name: "ubuntu_18_04_linux_e2e" - pipelineBuildImage: "containernetworking/pipeline-ci:1.0.6" - clusterDefinition: "cniLinux1804.json" - clusterDefinitionCniTypeKey: "azureCNIURLLinux" - clusterDefinitionCniBuildOS: "linux" - clusterDefinitionCniBuildExt: ".tgz" - - - template: e2e-job-template.yaml - parameters: - name: "windows_18_09_e2e" - pipelineBuildImage: "containernetworking/pipeline-ci:1.0.6" - clusterDefinition: "cniWindows1809.json" - clusterDefinitionCniTypeKey: "azureCNIURLWindows" - clusterDefinitionCniBuildOS: "windows" - clusterDefinitionCniBuildExt: ".zip" - - - template: e2e-job-template.yaml - parameters: - name: "windows_19_03_e2e" - pipelineBuildImage: "containernetworking/pipeline-ci:1.0.6" - clusterDefinition: "cniWindows1903.json" - clusterDefinitionCniTypeKey: "azureCNIURLWindows" - clusterDefinitionCniBuildOS: "windows" - clusterDefinitionCniBuildExt: ".zip" + # - template: e2e-job-template.yaml + # parameters: + # name: "ubuntu_16_04_linux_e2e" + # pipelineBuildImage: "containernetworking/pipeline-ci:1.0.6" + # clusterDefinition: "cniLinux1604.json" + # clusterDefinitionCniTypeKey: "azureCNIURLLinux" + # clusterDefinitionCniBuildOS: "linux" + # clusterDefinitionCniBuildExt: ".tgz" + # + # - template: e2e-job-template.yaml + # parameters: + # name: "ubuntu_18_04_linux_e2e" + # pipelineBuildImage: "containernetworking/pipeline-ci:1.0.6" + # clusterDefinition: "cniLinux1804.json" + # clusterDefinitionCniTypeKey: "azureCNIURLLinux" + # clusterDefinitionCniBuildOS: "linux" + # clusterDefinitionCniBuildExt: ".tgz" + # + # - template: e2e-job-template.yaml + # parameters: + # name: "windows_18_09_e2e" + # pipelineBuildImage: "containernetworking/pipeline-ci:1.0.6" + # clusterDefinition: "cniWindows1809.json" + # clusterDefinitionCniTypeKey: "azureCNIURLWindows" + # clusterDefinitionCniBuildOS: "windows" + # clusterDefinitionCniBuildExt: ".zip" + # + # - template: e2e-job-template.yaml + # parameters: + # name: "windows_19_03_e2e" + # pipelineBuildImage: "containernetworking/pipeline-ci:1.0.6" + # clusterDefinition: "cniWindows1903.json" + # clusterDefinitionCniTypeKey: "azureCNIURLWindows" + # clusterDefinitionCniBuildOS: "windows" + # clusterDefinitionCniBuildExt: ".zip" - stage: cleanup condition: always() From aca4ae9975023358b7f324be876bc629a57d0563 Mon Sep 17 00:00:00 2001 From: Mathew Merrick Date: Fri, 21 Feb 2020 18:52:06 +0000 Subject: [PATCH 14/23] update pipeline --- .pipelines/pipeline.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.pipelines/pipeline.yaml b/.pipelines/pipeline.yaml index fd3b7e9b3e..15cf6ded74 100644 --- a/.pipelines/pipeline.yaml +++ b/.pipelines/pipeline.yaml @@ -227,7 +227,6 @@ stages: scriptLocation: "inlineScript" inlineScript: | export CommitHash=(git rev-parse HEAD) - echo Tag is $(Tag) az storage container delete -n acn-$CommitHash --account-name $(STORAGE_ACCOUNT_NAME) az acr repository delete --name containernetworking --image containernetworking.azurecr.io/public/containernetworking/azure-npm:$(Tag)-test workingDirectory: "$(modulePath)" From 7c4f268dba05ee84c15edaa49dafd52db65d3896 Mon Sep 17 00:00:00 2001 From: Mathew Merrick Date: Fri, 21 Feb 2020 18:58:01 +0000 Subject: [PATCH 15/23] update pipeline --- .pipelines/pipeline.yaml | 62 +++++++++++++++++++++++----------------- 1 file changed, 36 insertions(+), 26 deletions(-) diff --git a/.pipelines/pipeline.yaml b/.pipelines/pipeline.yaml index 15cf6ded74..5a3903ffc2 100644 --- a/.pipelines/pipeline.yaml +++ b/.pipelines/pipeline.yaml @@ -171,6 +171,17 @@ stages: workingDirectory: "$(modulePath)" displayName: Create artifact storage container + - task: AzureCLI@1 + inputs: + azureSubscription: $(ARTIFACT_SUBSCRIPTION) + scriptLocation: "inlineScript" + inlineScript: | + export CommitHash=(git rev-parse HEAD) + az storage container delete -n acn-$CommitHash --account-name $(STORAGE_ACCOUNT_NAME) + az acr repository delete --name containernetworking --image containernetworking.azurecr.io/public/containernetworking/azure-npm:$(Tag)-test + workingDirectory: "$(modulePath)" + displayName: Cleanup remote Azure storage container + condition: always() # - template: e2e-job-template.yaml # parameters: # name: "ubuntu_16_04_linux_e2e" @@ -206,29 +217,28 @@ stages: # clusterDefinitionCniTypeKey: "azureCNIURLWindows" # clusterDefinitionCniBuildOS: "windows" # clusterDefinitionCniBuildExt: ".zip" - - - stage: cleanup - condition: always() - jobs: - - job: delete_remote_artifacts - pool: - name: Networking-ContainerNetworking - demands: agent.os -equals Linux - container: - image: containernetworking/pipeline-ci:1.0.6 - variables: - Tag: $[ build_and_test.unit_tests.outputs['EnvironmentalVariables.Tag'] ] - condition: always() - steps: - - checkout: none - - task: AzureCLI@1 - inputs: - azureSubscription: $(ARTIFACT_SUBSCRIPTION) - scriptLocation: "inlineScript" - inlineScript: | - export CommitHash=(git rev-parse HEAD) - az storage container delete -n acn-$CommitHash --account-name $(STORAGE_ACCOUNT_NAME) - az acr repository delete --name containernetworking --image containernetworking.azurecr.io/public/containernetworking/azure-npm:$(Tag)-test - workingDirectory: "$(modulePath)" - displayName: Cleanup remote Azure storage container - condition: always() +# - stage: cleanup +# condition: always() +# jobs: +# - job: delete_remote_artifacts +# pool: +# name: Networking-ContainerNetworking +# demands: agent.os -equals Linux +# container: +# image: containernetworking/pipeline-ci:1.0.6 +# variables: +# Tag: $[ build_and_test.unit_tests.outputs['EnvironmentalVariables.Tag'] ] +# condition: always() +# steps: +# - checkout: none +# - task: AzureCLI@1 +# inputs: +# azureSubscription: $(ARTIFACT_SUBSCRIPTION) +# scriptLocation: "inlineScript" +# inlineScript: | +# export CommitHash=(git rev-parse HEAD) +# az storage container delete -n acn-$CommitHash --account-name $(STORAGE_ACCOUNT_NAME) +# az acr repository delete --name containernetworking --image containernetworking.azurecr.io/public/containernetworking/azure-npm:$(Tag)-test +# workingDirectory: "$(modulePath)" +# displayName: Cleanup remote Azure storage container +# condition: always() From 148b6f261835c94bd8fa6f45fa381c605e31010c Mon Sep 17 00:00:00 2001 From: Mathew Merrick Date: Fri, 21 Feb 2020 19:09:46 +0000 Subject: [PATCH 16/23] update pipeline --- .pipelines/pipeline.yaml | 66 ++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 37 deletions(-) diff --git a/.pipelines/pipeline.yaml b/.pipelines/pipeline.yaml index 5a3903ffc2..55ac444e70 100644 --- a/.pipelines/pipeline.yaml +++ b/.pipelines/pipeline.yaml @@ -61,7 +61,7 @@ stages: fi workingDirectory: "$(modulePath)" name: "EnvironmentalVariables" - displayName: "Set build environmental variables" + displayName: "Set environmental variables" condition: always() - script: | @@ -171,17 +171,6 @@ stages: workingDirectory: "$(modulePath)" displayName: Create artifact storage container - - task: AzureCLI@1 - inputs: - azureSubscription: $(ARTIFACT_SUBSCRIPTION) - scriptLocation: "inlineScript" - inlineScript: | - export CommitHash=(git rev-parse HEAD) - az storage container delete -n acn-$CommitHash --account-name $(STORAGE_ACCOUNT_NAME) - az acr repository delete --name containernetworking --image containernetworking.azurecr.io/public/containernetworking/azure-npm:$(Tag)-test - workingDirectory: "$(modulePath)" - displayName: Cleanup remote Azure storage container - condition: always() # - template: e2e-job-template.yaml # parameters: # name: "ubuntu_16_04_linux_e2e" @@ -217,28 +206,31 @@ stages: # clusterDefinitionCniTypeKey: "azureCNIURLWindows" # clusterDefinitionCniBuildOS: "windows" # clusterDefinitionCniBuildExt: ".zip" -# - stage: cleanup -# condition: always() -# jobs: -# - job: delete_remote_artifacts -# pool: -# name: Networking-ContainerNetworking -# demands: agent.os -equals Linux -# container: -# image: containernetworking/pipeline-ci:1.0.6 -# variables: -# Tag: $[ build_and_test.unit_tests.outputs['EnvironmentalVariables.Tag'] ] -# condition: always() -# steps: -# - checkout: none -# - task: AzureCLI@1 -# inputs: -# azureSubscription: $(ARTIFACT_SUBSCRIPTION) -# scriptLocation: "inlineScript" -# inlineScript: | -# export CommitHash=(git rev-parse HEAD) -# az storage container delete -n acn-$CommitHash --account-name $(STORAGE_ACCOUNT_NAME) -# az acr repository delete --name containernetworking --image containernetworking.azurecr.io/public/containernetworking/azure-npm:$(Tag)-test -# workingDirectory: "$(modulePath)" -# displayName: Cleanup remote Azure storage container -# condition: always() + + - stage: cleanup + condition: always() + jobs: + - job: delete_remote_artifacts + pool: + name: Networking-ContainerNetworking + demands: agent.os -equals Linux + container: + image: containernetworking/pipeline-ci:1.0.6 + variables: + condition: always() + steps: + - task: AzureCLI@1 + inputs: + azureSubscription: $(ARTIFACT_SUBSCRIPTION) + scriptLocation: "inlineScript" + inlineScript: | + export CommitHash=(git rev-parse HEAD) + export Tag=$(git describe --tags --always --dirty) + if [[ "$(Build.SourceBranchName)" == "master" ]]; then + export Tag=$(git describe --tags --abbrev=0) + fi + az storage container delete -n acn-$CommitHash --account-name $(STORAGE_ACCOUNT_NAME) + az acr repository delete --name containernetworking --image containernetworking.azurecr.io/public/containernetworking/azure-npm:$Tag-test + workingDirectory: "$(modulePath)" + displayName: Cleanup remote Azure storage container + condition: always() From db93a5f89f5b6bd26b919ff49163f60cad1ea243 Mon Sep 17 00:00:00 2001 From: Mathew Merrick Date: Fri, 21 Feb 2020 19:10:22 +0000 Subject: [PATCH 17/23] update pipeline --- .pipelines/pipeline.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.pipelines/pipeline.yaml b/.pipelines/pipeline.yaml index 55ac444e70..e9f52bff90 100644 --- a/.pipelines/pipeline.yaml +++ b/.pipelines/pipeline.yaml @@ -216,7 +216,6 @@ stages: demands: agent.os -equals Linux container: image: containernetworking/pipeline-ci:1.0.6 - variables: condition: always() steps: - task: AzureCLI@1 From e82515aeb7c5234da58c282bbf2fbea843b4997c Mon Sep 17 00:00:00 2001 From: Mathew Merrick Date: Fri, 21 Feb 2020 19:20:41 +0000 Subject: [PATCH 18/23] update pipeline --- .pipelines/pipeline.yaml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.pipelines/pipeline.yaml b/.pipelines/pipeline.yaml index e9f52bff90..21912d1fa9 100644 --- a/.pipelines/pipeline.yaml +++ b/.pipelines/pipeline.yaml @@ -50,14 +50,11 @@ stages: - script: | 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) echo Building branch $BRANCH from $(Build.SourceBranch) if [[ "$BRANCH" == "master" ]]; then echo "##vso[task.setvariable variable=Tag;isOutput=true]$(git describe --tags --abbrev=0)" - echo "Set tag to $(git describe --tags --abbrev=0)" - else - echo "##vso[task.setvariable variable=Tag;isOutput=true]$(git describe --tags --always --dirty)" - echo "Set tag to $(git describe --tags --always --dirty)" fi workingDirectory: "$(modulePath)" name: "EnvironmentalVariables" @@ -229,7 +226,8 @@ stages: export Tag=$(git describe --tags --abbrev=0) fi az storage container delete -n acn-$CommitHash --account-name $(STORAGE_ACCOUNT_NAME) - az acr repository delete --name containernetworking --image containernetworking.azurecr.io/public/containernetworking/azure-npm:$Tag-test + echo tag is $Tag + az acr repository delete --name containernetworking --image $PUSH_CONTAINER_REGISTRY/azure-npm:$Tag-test workingDirectory: "$(modulePath)" displayName: Cleanup remote Azure storage container condition: always() From b116dbb11a85d49cb68982ca1f2944cbb9b931c7 Mon Sep 17 00:00:00 2001 From: Mathew Merrick Date: Fri, 21 Feb 2020 19:29:58 +0000 Subject: [PATCH 19/23] update pipeline --- .pipelines/pipeline.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.pipelines/pipeline.yaml b/.pipelines/pipeline.yaml index 21912d1fa9..161b1b9ea4 100644 --- a/.pipelines/pipeline.yaml +++ b/.pipelines/pipeline.yaml @@ -148,7 +148,8 @@ stages: sourceFolder: "$(modulePath)/output" targetFolder: $(Build.ArtifactStagingDirectory) condition: succeeded() - + export BRANCH=$(Build.SourceBranchName) + echo Building branch $BRANCH from $(Build.SourceBranch) - task: PublishBuildArtifacts@1 inputs: artifactName: "output" @@ -163,6 +164,7 @@ 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) workingDirectory: "$(modulePath)" @@ -225,8 +227,9 @@ stages: if [[ "$(Build.SourceBranchName)" == "master" ]]; then export Tag=$(git describe --tags --abbrev=0) fi + echo Deleting storage container with name acn-$(EnvironmentalVariables.CommitHash) and account name $(STORAGE_ACCOUNT_NAME) az storage container delete -n acn-$CommitHash --account-name $(STORAGE_ACCOUNT_NAME) - echo tag is $Tag + Deleting image $PUSH_CONTAINER_REGISTRY/azure-npm:$Tag-test az acr repository delete --name containernetworking --image $PUSH_CONTAINER_REGISTRY/azure-npm:$Tag-test workingDirectory: "$(modulePath)" displayName: Cleanup remote Azure storage container From cfd8911ce9b27ef9e9edaaca30f9294b9b3a2ee1 Mon Sep 17 00:00:00 2001 From: Mathew Merrick Date: Fri, 21 Feb 2020 19:34:53 +0000 Subject: [PATCH 20/23] update pipeline --- .pipelines/pipeline.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.pipelines/pipeline.yaml b/.pipelines/pipeline.yaml index 161b1b9ea4..41f9017349 100644 --- a/.pipelines/pipeline.yaml +++ b/.pipelines/pipeline.yaml @@ -148,8 +148,7 @@ stages: sourceFolder: "$(modulePath)/output" targetFolder: $(Build.ArtifactStagingDirectory) condition: succeeded() - export BRANCH=$(Build.SourceBranchName) - echo Building branch $BRANCH from $(Build.SourceBranch) + - task: PublishBuildArtifacts@1 inputs: artifactName: "output" From f1fefe93edaa8c6fd880aa278987d3e8704ed4ec Mon Sep 17 00:00:00 2001 From: Mathew Merrick Date: Fri, 21 Feb 2020 20:26:27 +0000 Subject: [PATCH 21/23] update pipelines --- .pipelines/pipeline.yaml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.pipelines/pipeline.yaml b/.pipelines/pipeline.yaml index 41f9017349..cbccf9ceca 100644 --- a/.pipelines/pipeline.yaml +++ b/.pipelines/pipeline.yaml @@ -216,20 +216,15 @@ stages: image: containernetworking/pipeline-ci:1.0.6 condition: always() steps: + - checkout: none - task: AzureCLI@1 inputs: azureSubscription: $(ARTIFACT_SUBSCRIPTION) scriptLocation: "inlineScript" inlineScript: | export CommitHash=(git rev-parse HEAD) - export Tag=$(git describe --tags --always --dirty) - if [[ "$(Build.SourceBranchName)" == "master" ]]; then - export Tag=$(git describe --tags --abbrev=0) - fi echo Deleting storage container with name acn-$(EnvironmentalVariables.CommitHash) and account name $(STORAGE_ACCOUNT_NAME) az storage container delete -n acn-$CommitHash --account-name $(STORAGE_ACCOUNT_NAME) - Deleting image $PUSH_CONTAINER_REGISTRY/azure-npm:$Tag-test - az acr repository delete --name containernetworking --image $PUSH_CONTAINER_REGISTRY/azure-npm:$Tag-test workingDirectory: "$(modulePath)" displayName: Cleanup remote Azure storage container condition: always() From a0c2e915350dbc88fa1a9a191118949bceb184f2 Mon Sep 17 00:00:00 2001 From: Mathew Merrick Date: Fri, 21 Feb 2020 20:33:31 +0000 Subject: [PATCH 22/23] update pipelines --- .pipelines/pipeline.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.pipelines/pipeline.yaml b/.pipelines/pipeline.yaml index cbccf9ceca..7332b55ac2 100644 --- a/.pipelines/pipeline.yaml +++ b/.pipelines/pipeline.yaml @@ -216,14 +216,13 @@ stages: image: containernetworking/pipeline-ci:1.0.6 condition: always() steps: - - checkout: none - task: AzureCLI@1 inputs: azureSubscription: $(ARTIFACT_SUBSCRIPTION) scriptLocation: "inlineScript" inlineScript: | export CommitHash=(git rev-parse HEAD) - echo Deleting storage container with name acn-$(EnvironmentalVariables.CommitHash) and account name $(STORAGE_ACCOUNT_NAME) + 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) workingDirectory: "$(modulePath)" displayName: Cleanup remote Azure storage container From c972e9bc577b13cc71d307aa86fbaa342a633b94 Mon Sep 17 00:00:00 2001 From: Mathew Merrick Date: Fri, 21 Feb 2020 20:38:35 +0000 Subject: [PATCH 23/23] update pipelines --- .pipelines/pipeline.yaml | 72 ++++++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/.pipelines/pipeline.yaml b/.pipelines/pipeline.yaml index 7332b55ac2..781081e1ff 100644 --- a/.pipelines/pipeline.yaml +++ b/.pipelines/pipeline.yaml @@ -169,41 +169,41 @@ stages: workingDirectory: "$(modulePath)" displayName: Create artifact storage container - # - template: e2e-job-template.yaml - # parameters: - # name: "ubuntu_16_04_linux_e2e" - # pipelineBuildImage: "containernetworking/pipeline-ci:1.0.6" - # clusterDefinition: "cniLinux1604.json" - # clusterDefinitionCniTypeKey: "azureCNIURLLinux" - # clusterDefinitionCniBuildOS: "linux" - # clusterDefinitionCniBuildExt: ".tgz" - # - # - template: e2e-job-template.yaml - # parameters: - # name: "ubuntu_18_04_linux_e2e" - # pipelineBuildImage: "containernetworking/pipeline-ci:1.0.6" - # clusterDefinition: "cniLinux1804.json" - # clusterDefinitionCniTypeKey: "azureCNIURLLinux" - # clusterDefinitionCniBuildOS: "linux" - # clusterDefinitionCniBuildExt: ".tgz" - # - # - template: e2e-job-template.yaml - # parameters: - # name: "windows_18_09_e2e" - # pipelineBuildImage: "containernetworking/pipeline-ci:1.0.6" - # clusterDefinition: "cniWindows1809.json" - # clusterDefinitionCniTypeKey: "azureCNIURLWindows" - # clusterDefinitionCniBuildOS: "windows" - # clusterDefinitionCniBuildExt: ".zip" - # - # - template: e2e-job-template.yaml - # parameters: - # name: "windows_19_03_e2e" - # pipelineBuildImage: "containernetworking/pipeline-ci:1.0.6" - # clusterDefinition: "cniWindows1903.json" - # clusterDefinitionCniTypeKey: "azureCNIURLWindows" - # clusterDefinitionCniBuildOS: "windows" - # clusterDefinitionCniBuildExt: ".zip" + - template: e2e-job-template.yaml + parameters: + name: "ubuntu_16_04_linux_e2e" + pipelineBuildImage: "containernetworking/pipeline-ci:1.0.6" + clusterDefinition: "cniLinux1604.json" + clusterDefinitionCniTypeKey: "azureCNIURLLinux" + clusterDefinitionCniBuildOS: "linux" + clusterDefinitionCniBuildExt: ".tgz" + + - template: e2e-job-template.yaml + parameters: + name: "ubuntu_18_04_linux_e2e" + pipelineBuildImage: "containernetworking/pipeline-ci:1.0.6" + clusterDefinition: "cniLinux1804.json" + clusterDefinitionCniTypeKey: "azureCNIURLLinux" + clusterDefinitionCniBuildOS: "linux" + clusterDefinitionCniBuildExt: ".tgz" + + - template: e2e-job-template.yaml + parameters: + name: "windows_18_09_e2e" + pipelineBuildImage: "containernetworking/pipeline-ci:1.0.6" + clusterDefinition: "cniWindows1809.json" + clusterDefinitionCniTypeKey: "azureCNIURLWindows" + clusterDefinitionCniBuildOS: "windows" + clusterDefinitionCniBuildExt: ".zip" + + - template: e2e-job-template.yaml + parameters: + name: "windows_19_03_e2e" + pipelineBuildImage: "containernetworking/pipeline-ci:1.0.6" + clusterDefinition: "cniWindows1903.json" + clusterDefinitionCniTypeKey: "azureCNIURLWindows" + clusterDefinitionCniBuildOS: "windows" + clusterDefinitionCniBuildExt: ".zip" - stage: cleanup condition: always() @@ -221,7 +221,7 @@ stages: azureSubscription: $(ARTIFACT_SUBSCRIPTION) scriptLocation: "inlineScript" inlineScript: | - export CommitHash=(git rev-parse HEAD) + 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) workingDirectory: "$(modulePath)"