From 34433c5b2b82195e53d3497828bb0afbf7df1373 Mon Sep 17 00:00:00 2001 From: Maggie Nolan Date: Mon, 24 Jun 2019 12:15:14 -0700 Subject: [PATCH] chore: retry docker run, instead of commands in build.sh --- tools/build/build.sh | 8 ++------ tools/build/linux_build_and_test.sh | 4 ++-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/tools/build/build.sh b/tools/build/build.sh index 67c27c2e..d9e54b67 100755 --- a/tools/build/build.sh +++ b/tools/build/build.sh @@ -20,21 +20,17 @@ set -e pipefail # Display commands set -x -retry() { - "${@}" || "${@}" || "${@}" || exit $? -} - cd $(dirname $0)/../.. BASE_DIR=$PWD ARTIFACTS_OUT="${BASE_DIR}/artifacts" mkdir -p "$ARTIFACTS_OUT" -retry npm install +npm install for version in 6.0.0 8.0.0 10.0.0 11.0.0 12.0.0 do - retry ./node_modules/.bin/node-pre-gyp configure rebuild package \ + ./node_modules/.bin/node-pre-gyp configure rebuild package \ --target=$version --target_arch="x64" cp -r build/stage/* "${ARTIFACTS_OUT}/" rm -rf build diff --git a/tools/build/linux_build_and_test.sh b/tools/build/linux_build_and_test.sh index d55332ce..753cc408 100644 --- a/tools/build/linux_build_and_test.sh +++ b/tools/build/linux_build_and_test.sh @@ -46,11 +46,11 @@ cd $(dirname $0)/../.. BASE_DIR=$PWD retry docker build -t build-linux -f tools/build/Dockerfile.linux tools/build -docker run -v "${BASE_DIR}":"${BASE_DIR}" build-linux \ +retry docker run -v "${BASE_DIR}":"${BASE_DIR}" build-linux \ "${BASE_DIR}/tools/build/build.sh" retry docker build -t build-alpine -f tools/build/Dockerfile.alpine tools/build -docker run -v "${BASE_DIR}":"${BASE_DIR}" build-alpine \ +retry docker run -v "${BASE_DIR}":"${BASE_DIR}" build-alpine \ "${BASE_DIR}/tools/build/build.sh" GCS_LOCATION="cprof-e2e-nodejs-artifacts/pprof-nodejs/kokoro/${BUILD_TYPE}/${KOKORO_BUILD_NUMBER}"