diff --git a/.pipelines/Dockerfile b/.pipelines/Dockerfile index a5f06e74eb..24935d49c9 100644 --- a/.pipelines/Dockerfile +++ b/.pipelines/Dockerfile @@ -4,6 +4,7 @@ RUN wget -q https://packages.microsoft.com/config/ubuntu/16.04/packages-microsof RUN sudo dpkg -i packages-microsoft-prod.deb RUN add-apt-repository ppa:longsleep/golang-backports RUN curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash +RUN curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh RUN apt-get install -y git golang-go=2:1.13~1longsleep1+xenial iptables ipset iproute2 ebtables python-pip gcc zip dotnet-sdk-2.2 azure-cli RUN sudo pip install coverage RUN if [ -f Gopkg.toml ]; then curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh ; fi diff --git a/.pipelines/e2e-job-template.yaml b/.pipelines/e2e-job-template.yaml index bd3b325d33..a18a472d23 100644 --- a/.pipelines/e2e-job-template.yaml +++ b/.pipelines/e2e-job-template.yaml @@ -1,6 +1,6 @@ parameters: name: "" - pipelineBuildImage: "containernetworking/pipeline-ci:1.0.4" + pipelineBuildImage: "containernetworking/pipeline-ci:1.0.6" clusterDefinition: "" clusterDefinitionCniTypeKey: "" clusterDefinitionCniBuildOS: "" diff --git a/.pipelines/e2e-step-template.yaml b/.pipelines/e2e-step-template.yaml index 6c8c929cde..9726b7c608 100644 --- a/.pipelines/e2e-step-template.yaml +++ b/.pipelines/e2e-step-template.yaml @@ -66,12 +66,10 @@ steps: export CNI_URL=https://$(ARTIFACT_STORAGE).blob.core.windows.net/acn-$(CommitHash)/azure-vnet-cni-${{ parameters.clusterDefinitionCniBuildOS }}-amd64-$(Tag)${{ parameters.clusterDefinitionCniBuildExt }} export CNI_TYPE=${{ parameters.clusterDefinitionCniTypeKey }} echo CNI type is $CNI_TYPE - #sed -i "s|\"$CNI_TYPE\":\".*\"|\"$CNI_TYPE\":$CNI_URL|g" '${{ parameters.clusterDefinition }}' - # sed -i "s|\"$CNI_TYPE\":\".*\"|\"$CNI_TYPE\":$CNI_URL|g" '${{ parameters.clusterDefinition }}' cat '${{ parameters.clusterDefinition }}' | jq --arg cnikey $CNI_TYPE --arg cniurl $CNI_URL '.properties.orchestratorProfile.kubernetesConfig[$cnikey]= $cniurl' > '${{ parameters.clusterDefinition }}'.tmp # - # sed -i "s|\"azureCNIVersion\":\".*\"|\"azureCNIVersion\":\"$(Tag)\"|g" '${{ parameters.clusterDefinition }}' - #sed -i "s|\"azureCNIVersion\":\".*\"|\"azureCNIVersion\":\"$(Tag)\"|g" '${{ parameters.clusterDefinition }}' 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 + mv '${{ parameters.clusterDefinition }}'.tmp '${{ parameters.clusterDefinition }}' echo "Running E2E tests against a cluster built with the following API model:" cat '${{ parameters.clusterDefinition }}' cp ${{ parameters.clusterDefinition }} clusterDefinition.json diff --git a/.pipelines/pipeline.yaml b/.pipelines/pipeline.yaml index 5d4fe31f6a..ef596228ef 100644 --- a/.pipelines/pipeline.yaml +++ b/.pipelines/pipeline.yaml @@ -17,7 +17,7 @@ stages: demands: agent.os -equals Linux container: - image: containernetworking/pipeline-ci:1.0.4 + image: containernetworking/pipeline-ci:1.0.6 options: "--privileged" # Go setup for the vmImage: @@ -66,9 +66,6 @@ stages: - script: | go get -v -t -d ./... - if [ -f Gopkg.toml ]; then - curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh - fi go get github.com/docker/libnetwork/driverapi go get github.com/gorilla/mux go get github.com/jstemmer/go-junit-report @@ -82,10 +79,14 @@ stages: - script: | echo Building in $(pwd) echo Build tag is $(EnvironmentalVariables.Tag) - export GOOS=linux - make all-binaries VERSION=$(EnvironmentalVariables.Tag) export GOOS=windows make all-binaries VERSION=$(EnvironmentalVariables.Tag) + 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) cd output sudo find . -mindepth 2 -type f -regextype posix-extended ! -iregex '.*\.(zip|tgz)$' -delete sudo find . -mindepth 2 -type f -print -exec mv {} . \; @@ -158,7 +159,7 @@ stages: - template: e2e-job-template.yaml parameters: name: "ubuntu_16_04_linux_e2e" - pipelineBuildImage: "containernetworking/pipeline-ci:1.0.5" + pipelineBuildImage: "containernetworking/pipeline-ci:1.0.6" clusterDefinition: "cniLinux1604.json" clusterDefinitionCniTypeKey: "azureCNIURLLinux" clusterDefinitionCniBuildOS: "linux" @@ -167,7 +168,7 @@ stages: - template: e2e-job-template.yaml parameters: name: "ubuntu_18_04_linux_e2e" - pipelineBuildImage: "containernetworking/pipeline-ci:1.0.5" + pipelineBuildImage: "containernetworking/pipeline-ci:1.0.6" clusterDefinition: "cniLinux1804.json" clusterDefinitionCniTypeKey: "azureCNIURLLinux" clusterDefinitionCniBuildOS: "linux" @@ -176,7 +177,7 @@ stages: - template: e2e-job-template.yaml parameters: name: "windows_18_09_e2e" - pipelineBuildImage: "containernetworking/pipeline-ci:1.0.5" + pipelineBuildImage: "containernetworking/pipeline-ci:1.0.6" clusterDefinition: "cniWindows1809.json" clusterDefinitionCniTypeKey: "azureCNIURLWindows" clusterDefinitionCniBuildOS: "windows" @@ -185,7 +186,7 @@ stages: - template: e2e-job-template.yaml parameters: name: "windows_19_03_e2e" - pipelineBuildImage: "containernetworking/pipeline-ci:1.0.5" + pipelineBuildImage: "containernetworking/pipeline-ci:1.0.6" clusterDefinition: "cniWindows1903.json" clusterDefinitionCniTypeKey: "azureCNIURLWindows" clusterDefinitionCniBuildOS: "windows" @@ -199,7 +200,7 @@ stages: name: Networking-ContainerNetworking demands: agent.os -equals Linux container: - image: containernetworking/pipeline-ci:1.0.4 + image: containernetworking/pipeline-ci:1.0.6 variables: Tag: $[ dependencies.unit_tests.outputs['EnvironmentalVariables.Tag'] ] condition: always() diff --git a/test/e2e/kubernetes/cniLinux1604.json b/test/e2e/kubernetes/cniLinux1604.json index 1e9da55b37..46d7783e72 100644 --- a/test/e2e/kubernetes/cniLinux1604.json +++ b/test/e2e/kubernetes/cniLinux1604.json @@ -3,7 +3,7 @@ "properties": { "orchestratorProfile": { "orchestratorType": "Kubernetes", - "orchestratorRelease": "1.14", + "orchestratorRelease": "1.16", "kubernetesConfig": { "networkPlugin": "azure", "networkPolicy": "azure", @@ -12,7 +12,19 @@ "apiServerConfig": { "--tls-min-version": "VersionTLS12", "--tls-cipher-suites": "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256" - } + }, + "addons": [ + { + "name": "azure-npm-daemonset", + "enabled": true, + "containers": [ + { + "name": "azure-npm-daemonset", + "image": "" + } + ] + } + ] } }, "masterProfile": { diff --git a/test/e2e/kubernetes/cniLinux1804.json b/test/e2e/kubernetes/cniLinux1804.json index 4f89417aa1..096dacefcb 100644 --- a/test/e2e/kubernetes/cniLinux1804.json +++ b/test/e2e/kubernetes/cniLinux1804.json @@ -3,7 +3,7 @@ "properties": { "orchestratorProfile": { "orchestratorType": "Kubernetes", - "orchestratorRelease": "1.14", + "orchestratorRelease": "1.16", "kubernetesConfig": { "networkPlugin": "azure", "networkPolicy": "azure", @@ -12,7 +12,19 @@ "apiServerConfig": { "--tls-min-version": "VersionTLS12", "--tls-cipher-suites": "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256" - } + }, + "addons": [ + { + "name": "azure-npm-daemonset", + "enabled": true, + "containers": [ + { + "name": "azure-npm-daemonset", + "image": "" + } + ] + } + ] } }, "masterProfile": { diff --git a/test/e2e/kubernetes/cniWindows1809.json b/test/e2e/kubernetes/cniWindows1809.json index c8fa2db943..d26f277da0 100644 --- a/test/e2e/kubernetes/cniWindows1809.json +++ b/test/e2e/kubernetes/cniWindows1809.json @@ -3,7 +3,7 @@ "properties": { "orchestratorProfile": { "orchestratorType": "Kubernetes", - "orchestratorRelease": "1.14", + "orchestratorRelease": "1.16", "kubernetesConfig": { "networkPlugin": "azure", "networkPolicy": "azure", @@ -12,7 +12,19 @@ "apiServerConfig": { "--tls-min-version": "VersionTLS12", "--tls-cipher-suites": "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256" - } + }, + "addons": [ + { + "name": "azure-npm-daemonset", + "enabled": true, + "containers": [ + { + "name": "azure-npm-daemonset", + "image": "" + } + ] + } + ] } }, "masterProfile": { @@ -40,9 +52,9 @@ "enableAutomaticUpdates": false, "sshEnabled": true, "windowsPublisher": "MicrosoftWindowsServer", - "windowsOffer": "WindowsServer", + "windowsOffer": "WindowsServerSemiAnnual", "windowsSku": "Datacenter-Core-1809-with-Containers-smalldisk", - "imageVersion": "1809.0.20190603" + "imageVersion": "1809.0.20190826" }, "linuxProfile": { "adminUsername": "azureuser", diff --git a/test/e2e/kubernetes/cniWindows1903.json b/test/e2e/kubernetes/cniWindows1903.json index 23716d725a..25ed53f82f 100644 --- a/test/e2e/kubernetes/cniWindows1903.json +++ b/test/e2e/kubernetes/cniWindows1903.json @@ -3,7 +3,7 @@ "properties": { "orchestratorProfile": { "orchestratorType": "Kubernetes", - "orchestratorRelease": "1.14", + "orchestratorRelease": "1.16", "kubernetesConfig": { "networkPlugin": "azure", "networkPolicy": "azure", @@ -12,7 +12,19 @@ "apiServerConfig": { "--tls-min-version": "VersionTLS12", "--tls-cipher-suites": "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256" - } + }, + "addons": [ + { + "name": "azure-npm-daemonset", + "enabled": true, + "containers": [ + { + "name": "azure-npm-daemonset", + "image": "" + } + ] + } + ] } }, "masterProfile": {