From dc37410502e4bb55645bc96e6936392ff450a880 Mon Sep 17 00:00:00 2001 From: Mathew Merrick Date: Thu, 23 Jul 2020 23:21:49 -0700 Subject: [PATCH] Pipeline update (#627) * pipeline update * dockerfile update * ipset update --- .pipelines/Dockerfile | 18 +++++++++++++----- .pipelines/pipeline.yaml | 14 +++++++------- Makefile | 1 + 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/.pipelines/Dockerfile b/.pipelines/Dockerfile index bfd9cb40d..7bb58ed79 100644 --- a/.pipelines/Dockerfile +++ b/.pipelines/Dockerfile @@ -1,13 +1,21 @@ -FROM ubuntu:20.04 +FROM ubuntu:16.04 RUN apt-get update && apt-get install -y software-properties-common sudo wget apt-utils apt-transport-https curl lsb-release gnupg jq RUN wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb -RUN sudo dpkg -i packages-microsoft-prod.deb +RUN dpkg -i packages-microsoft-prod.deb 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 install -y git golang-1.14-go iptables ipset iproute2 ebtables python3-pip gcc zip dotnet-sdk-3.1 azure-cli +RUN apt install -y git python3-pip gcc zip dotnet-sdk-3.1 azure-cli RUN apt install -y --no-install-recommends clang cmake zlib1g-dev libboost-dev libboost-thread-dev gdb build-essential libssl-dev -RUN sudo pip3 install coverage -ENV PATH="/usr/lib/go-1.14/bin/:${PATH}" +RUN pip3 install coverage +RUN echo "deb http://archive.ubuntu.com/ubuntu/ bionic multiverse" | sudo tee -a /etc/apt/sources.list +RUN echo "deb http://archive.ubuntu.com/ubuntu/ bionic universe" | sudo tee -a /etc/apt/sources.list +RUN echo "deb http://archive.ubuntu.com/ubuntu/ bionic main" | sudo tee -a /etc/apt/sources.list +RUN apt-get update && apt-get install -y iptables ipset iproute2 ebtables +RUN wget -qO- https://golang.org/dl/go1.14.6.linux-amd64.tar.gz | tar zxf - -C /usr/lib/ +ENV PATH="/usr/lib/go/bin/:${PATH}" +ENV GOROOT="/usr/lib/go" +ENV GOPATH="/root/go" +ENV PATH="/root/go/bin/:${PATH}" RUN go get github.com/docker/libnetwork/driverapi RUN go get github.com/gorilla/mux RUN go get github.com/jstemmer/go-junit-report diff --git a/.pipelines/pipeline.yaml b/.pipelines/pipeline.yaml index 944c90aca..6e5b392b4 100644 --- a/.pipelines/pipeline.yaml +++ b/.pipelines/pipeline.yaml @@ -93,13 +93,6 @@ stages: name: "BuildLinux" displayName: "Build Linux" - - script: | - make all-binaries VERSION=$(EnvironmentalVariables.Tag) - sudo make azure-npm-image VERSION=$(EnvironmentalVariables.Tag) - workingDirectory: "$(modulePath)" - name: "BuildNPMImage" - displayName: "Build NPM Image" - - bash: | cd ./output sudo find . -mindepth 2 -type f -regextype posix-extended ! -iregex '.*\.(zip|tgz)$' -delete @@ -117,6 +110,13 @@ stages: name: "Test" displayName: "Run Tests" + - script: | + make all-binaries VERSION=$(EnvironmentalVariables.Tag) + sudo make azure-npm-image VERSION=$(EnvironmentalVariables.Tag) + workingDirectory: "$(modulePath)" + name: "BuildNPMImage" + displayName: "Build NPM Image" + - bash: | export CODECOV_TOKEN=$(CODECOV_TOKEN) bash <(curl -s https://codecov.io/bash) diff --git a/Makefile b/Makefile index 6e821d8e2..b8c51f067 100644 --- a/Makefile +++ b/Makefile @@ -272,6 +272,7 @@ publish-azure-vnet-plugin-image: azure-npm-image: azure-npm ifeq ($(GOOS),linux) docker build \ + --no-cache \ -f npm/Dockerfile \ -t $(AZURE_NPM_IMAGE):$(VERSION) \ --build-arg NPM_BUILD_DIR=$(NPM_BUILD_DIR) \