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 <siggy@buoyant.io>
This commit is contained in:
Andrew Seigner 2019-05-07 13:17:18 +02:00 committed by GitHub
parent d907990f43
commit 5ece3430eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 1 deletions

View File

@ -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