Skip to content

Commit b3c3433

Browse files
nolanmar511kalyanac
authored andcommitted
chore: retry docker run, instead of commands in build.sh (#72)
1 parent 138d5bd commit b3c3433

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

tools/build/build.sh

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,17 @@ set -e pipefail
2020
# Display commands
2121
set -x
2222

23-
retry() {
24-
"${@}" || "${@}" || "${@}" || exit $?
25-
}
26-
2723
cd $(dirname $0)/../..
2824
BASE_DIR=$PWD
2925

3026
ARTIFACTS_OUT="${BASE_DIR}/artifacts"
3127
mkdir -p "$ARTIFACTS_OUT"
3228

33-
retry npm install
29+
npm install
3430

3531
for version in 6.0.0 8.0.0 10.0.0 11.0.0 12.0.0
3632
do
37-
retry ./node_modules/.bin/node-pre-gyp configure rebuild package \
33+
./node_modules/.bin/node-pre-gyp configure rebuild package \
3834
--target=$version --target_arch="x64"
3935
cp -r build/stage/* "${ARTIFACTS_OUT}/"
4036
rm -rf build

tools/build/linux_build_and_test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ cd $(dirname $0)/../..
4646
BASE_DIR=$PWD
4747

4848
retry docker build -t build-linux -f tools/build/Dockerfile.linux tools/build
49-
docker run -v "${BASE_DIR}":"${BASE_DIR}" build-linux \
49+
retry docker run -v "${BASE_DIR}":"${BASE_DIR}" build-linux \
5050
"${BASE_DIR}/tools/build/build.sh"
5151

5252
retry docker build -t build-alpine -f tools/build/Dockerfile.alpine tools/build
53-
docker run -v "${BASE_DIR}":"${BASE_DIR}" build-alpine \
53+
retry docker run -v "${BASE_DIR}":"${BASE_DIR}" build-alpine \
5454
"${BASE_DIR}/tools/build/build.sh"
5555

5656
GCS_LOCATION="cprof-e2e-nodejs-artifacts/pprof-nodejs/kokoro/${BUILD_TYPE}/${KOKORO_BUILD_NUMBER}"

0 commit comments

Comments
 (0)