Skip to content

Commit

Permalink
Resolve CI job race condition
Browse files Browse the repository at this point in the history
  • Loading branch information
wangzhen127 committed Mar 19, 2019
1 parent 796c8d0 commit 85b6268
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,8 @@ export NODE_PROBLEM_DETECTOR_TAR_HASH=$(sha1sum ${ROOT_PATH}/node-problem-detect
export EXTRA_ENVS=NODE_PROBLEM_DETECTOR_IMAGE=${REGISTRY}/node-problem-detector:${TAG}
EOF

set -x
echo "Written env file ${ROOT_PATH}/${env_file}:"
cat ${ROOT_PATH}/${env_file}
set +x
}

function build-pr() {
Expand All @@ -94,7 +93,7 @@ function build-ci() {
install-lib
export UPLOAD_PATH="${NPD_STAGING_PATH}/ci"
export REGISTRY="${NPD_STAGING_REGISTRY}/ci"
export VERSION=$(get-version)
export VERSION="$(get-version)-$(date +%Y%m%d.%H%M)"
export TAG="${VERSION}"
make push
write-env-file ${CI_ENV_FILENAME}
Expand All @@ -103,6 +102,9 @@ function build-ci() {

function get-ci-env() {
gsutil cp ${NPD_STAGING_PATH}/ci/${CI_ENV_FILENAME} ${ROOT_PATH}/${CI_ENV_FILENAME}

echo "Using env file ${ROOT_PATH}/${CI_ENV_FILENAME}:"
cat ${ROOT_PATH}/${CI_ENV_FILENAME}
}


Expand Down

0 comments on commit 85b6268

Please sign in to comment.