From 5ece3430eb72d8286214e599997f3f703f943fd3 Mon Sep 17 00:00:00 2001 From: Andrew Seigner Date: Tue, 7 May 2019 13:17:18 +0200 Subject: [PATCH] Fix proxy build to build go-deps and set version (#2797) The `docker-build-proxy` script builds `Dockerfile-proxy`. That Dockerfile depends on a go-deps image, and takes a `LINKERD_VERSION` arg. The `docker-build-proxy` script was neither ensuring go-deps had been built, nor setting `LINKERD_VERSION`. The former resulted in the build failing if go-deps did not exist. The latter resulted in `dev-undefined` log messages in the `linkerd-proxy` container. Fix `docker-build-proxy` to ensure go-deps are built, and also set the `LINKERD_VERSION`. This brings this script more in-line with the other `docker-build-*` scripts. Signed-off-by: Andrew Seigner --- bin/docker-build-proxy | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/bin/docker-build-proxy b/bin/docker-build-proxy index 50872f124..255f8350a 100755 --- a/bin/docker-build-proxy +++ b/bin/docker-build-proxy @@ -13,7 +13,17 @@ rootdir="$( cd $bindir/.. && pwd )" . $bindir/_docker.sh . $bindir/_tag.sh +dockerfile=$rootdir/Dockerfile-proxy + +validate_go_deps_tag $dockerfile + +( + $bindir/docker-build-base + $bindir/docker-build-go-deps +) >/dev/null + # Default to a pinned commit SHA of the proxy. PROXY_VERSION="${PROXY_VERSION:-5018026}" -docker_build proxy "$(head_root_tag)" $rootdir/Dockerfile-proxy --build-arg PROXY_VERSION=$PROXY_VERSION +tag="$(head_root_tag)" +docker_build proxy $tag $dockerfile --build-arg LINKERD_VERSION=$tag --build-arg PROXY_VERSION=$PROXY_VERSION