From 0e2951be41e90e8124317668b7cc847c07c42e6b Mon Sep 17 00:00:00 2001 From: Harvey Tuch Date: Thu, 27 Apr 2017 11:37:51 -0400 Subject: [PATCH 1/4] ci: fix some issues post #837. Alpine build was failing, fixed and changed to build even when not pushing to master to catch this next time. --- ci/build_alpine_container/Makefile | 2 +- ci/docker_push.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/build_alpine_container/Makefile b/ci/build_alpine_container/Makefile index 828d1d334c477..e094181014df2 100644 --- a/ci/build_alpine_container/Makefile +++ b/ci/build_alpine_container/Makefile @@ -13,7 +13,7 @@ binary: mkdir -p ./bin/debug mkdir -p ./bin/configs docker run -t -i --name build-envoy-alpine-ct -v ${ROOT_DIR}/../../:/source -v $(ENVOY_BUILD_DIR):/build lyft/envoy-build:latest /bin/bash -c \ - "set -x && cd /source && + "set -x && cd /source && \ cp /build/envoy/source/exe/envoy /tmp/envoy && \ cd /tmp/ && strip envoy && \ mv /tmp/envoy /source/ci/build_alpine_container/bin/stripped/ && \ diff --git a/ci/docker_push.sh b/ci/docker_push.sh index 7aad176cc292f..a4494bd2da0b9 100755 --- a/ci/docker_push.sh +++ b/ci/docker_push.sh @@ -1,10 +1,11 @@ #!/bin/bash set -e -set -x # this is needed to verify the example images docker build -f ci/Dockerfile-envoy-image -t lyft/envoy:latest . +# verify the Alpine build even when we're not pushing it +make -C ci/build_alpine_container # push the envoy image on merge to master want_push='false' @@ -21,7 +22,6 @@ then docker push lyft/envoy:latest docker tag lyft/envoy:latest lyft/envoy:$TRAVIS_COMMIT docker push lyft/envoy:$TRAVIS_COMMIT - make -C ci/build_alpine_container docker tag lyft/envoy-alpine:latest lyft/envoy-alpine:$TRAVIS_COMMIT docker push lyft/envoy-alpine:$TRAVIS_COMMIT docker push lyft/envoy-alpine:latest From 290a96d57eace4d2699400a122efc2fad8eaafd5 Mon Sep 17 00:00:00 2001 From: Harvey Tuch Date: Thu, 27 Apr 2017 12:20:06 -0400 Subject: [PATCH 2/4] Path fix. --- ci/build_alpine_container/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/build_alpine_container/Makefile b/ci/build_alpine_container/Makefile index e094181014df2..62b10edea02e0 100644 --- a/ci/build_alpine_container/Makefile +++ b/ci/build_alpine_container/Makefile @@ -17,7 +17,7 @@ binary: cp /build/envoy/source/exe/envoy /tmp/envoy && \ cd /tmp/ && strip envoy && \ mv /tmp/envoy /source/ci/build_alpine_container/bin/stripped/ && \ - cp /source/build_normal/source/exe/envoy /source/ci/build_alpine_container/bin/debug/ && \ + cp /build/envoy/source/exe/envoy /source/ci/build_alpine_container/bin/debug/ && \ cp /source/configs/google_com_proxy.json /source/ci/build_alpine_container/bin/configs/" docker rm -f build-envoy-alpine-ct # Fail build if a core file gets generated during the build. From 716137d2912c37bed179358622ee8aa20b89893f Mon Sep 17 00:00:00 2001 From: Harvey Tuch Date: Thu, 27 Apr 2017 12:36:05 -0400 Subject: [PATCH 3/4] Remove -e --- ci/docker_push.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/docker_push.sh b/ci/docker_push.sh index a4494bd2da0b9..5bd2a1961c779 100755 --- a/ci/docker_push.sh +++ b/ci/docker_push.sh @@ -18,7 +18,7 @@ do done if [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$want_push" == "true" ] then - docker login -e $DOCKER_EMAIL -u $DOCKER_USERNAME -p $DOCKER_PASSWORD + docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD docker push lyft/envoy:latest docker tag lyft/envoy:latest lyft/envoy:$TRAVIS_COMMIT docker push lyft/envoy:$TRAVIS_COMMIT From c480fd90f9385f998ecf87b27cb1b221a6572e28 Mon Sep 17 00:00:00 2001 From: Harvey Tuch Date: Thu, 27 Apr 2017 12:39:35 -0400 Subject: [PATCH 4/4] A word to the wise. --- ci/docker_push.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ci/docker_push.sh b/ci/docker_push.sh index 5bd2a1961c779..338390bd7261d 100755 --- a/ci/docker_push.sh +++ b/ci/docker_push.sh @@ -1,5 +1,7 @@ #!/bin/bash +# Do not ever set -x here, it is a security hazard as it will place the credentials below in the +# Travis logs. set -e # this is needed to verify the example images