From 2b17980e3c05cfe2ebd7f3e3ad583e0911ff3b09 Mon Sep 17 00:00:00 2001 From: Manuel Alejandro de Brito Fontes Date: Tue, 2 Jun 2020 16:59:34 -0400 Subject: [PATCH] Remove copy of binaries and deprecated e2e task --- Makefile | 9 +-------- build/build.sh | 6 +++--- docs/development.md | 2 +- test/e2e/run.sh | 6 +++--- 4 files changed, 8 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index 28c747d79..0c799e1c7 100644 --- a/Makefile +++ b/Makefile @@ -74,7 +74,6 @@ help: ## Display this help .PHONY: image image: clean-image ## Build image for a particular arch. echo "Building docker image ($(ARCH))..." - @cp -R bin/ rootfs/bin @docker build \ --no-cache \ --build-arg BASE_IMAGE="$(BASE_IMAGE)" \ @@ -159,10 +158,6 @@ endif e2e-test: check-go-version ## Run e2e tests (expects access to a working Kubernetes cluster). @build/run-e2e-suite.sh -.PHONY: e2e-test-image -e2e-test-image: ## Build image for e2e tests. - @make -C test/e2e-image - .PHONY: e2e-test-binary e2e-test-binary: check-go-version ## Build ginkgo binary for e2e tests. ifeq ($(USE_DOCKER), true) @@ -265,9 +260,7 @@ COMMA := , .PHONY: release # Build a multi-arch docker image release: init-docker-buildx clean echo "Building binaries..." - $(foreach PLATFORM,$(PLATFORMS), ARCH=$(PLATFORM) make build;) - - @cp -R bin/ rootfs/bin + $(foreach PLATFORM,$(PLATFORMS), echo -n "$(PLATFORM)..."; ARCH=$(PLATFORM) make build;) echo "Building and pushing ingress-nginx image..." @docker buildx build \ diff --git a/build/build.sh b/build/build.sh index 0e956faaf..3c235d598 100755 --- a/build/build.sh +++ b/build/build.sh @@ -51,18 +51,18 @@ go build \ -X ${PKG}/version.RELEASE=${TAG} \ -X ${PKG}/version.COMMIT=${GIT_COMMIT} \ -X ${PKG}/version.REPO=${REPO_INFO}" \ - -o "bin/${ARCH}/nginx-ingress-controller" "${PKG}/cmd/nginx" + -o "rootfs/bin/${ARCH}/nginx-ingress-controller" "${PKG}/cmd/nginx" go build \ -ldflags "-s -w \ -X ${PKG}/version.RELEASE=${TAG} \ -X ${PKG}/version.COMMIT=${GIT_COMMIT} \ -X ${PKG}/version.REPO=${REPO_INFO}" \ - -o "bin/${ARCH}/dbg" "${PKG}/cmd/dbg" + -o "rootfs/bin/${ARCH}/dbg" "${PKG}/cmd/dbg" go build \ -ldflags "-s -w \ -X ${PKG}/version.RELEASE=${TAG} \ -X ${PKG}/version.COMMIT=${GIT_COMMIT} \ -X ${PKG}/version.REPO=${REPO_INFO}" \ - -o "bin/${ARCH}/wait-shutdown" "${PKG}/cmd/waitshutdown" + -o "rootfs/bin/${ARCH}/wait-shutdown" "${PKG}/cmd/waitshutdown" diff --git a/docs/development.md b/docs/development.md index 367123f77..3b6b3e9a7 100644 --- a/docs/development.md +++ b/docs/development.md @@ -76,7 +76,7 @@ To find the registry simply run: `docker system info | grep Registry` The e2e test image can also be built through the Makefile. ```console -$ make e2e-test-image +$ make -C test/e2e-image image ``` You can then make this image available on your minikube host by exporting the image and loading it with the minikube docker context: diff --git a/test/e2e/run.sh b/test/e2e/run.sh index 77cd1d6d0..4a3ccc7bd 100755 --- a/test/e2e/run.sh +++ b/test/e2e/run.sh @@ -63,7 +63,7 @@ export K8S_VERSION=${K8S_VERSION:-v1.18.0@sha256:0e20578828edd939d25eb98496a685c export DOCKER_CLI_EXPERIMENTAL=enabled -KIND_CLUSTER_NAME="ingress-nginx-dev" +export KIND_CLUSTER_NAME=${KIND_CLUSTER_NAME:-ingress-nginx-dev} echo "[dev-env] creating Kubernetes cluster with kind" @@ -81,8 +81,8 @@ kubectl get nodes -o wide echo "[dev-env] building image" export EXIT_CODE=-1 echo " -make -C ${DIR}/../../ build image -make -C ${DIR}/../../ e2e-test-image +make -C ${DIR}/../../ clean-image build image +make -C ${DIR}/../e2e-image image make -C ${DIR}/../../images/fastcgi-helloserver/ GO111MODULE=\"on\" build image make -C ${DIR}/../../images/httpbin/ image make -C ${DIR}/../../images/echo/ image