Skip to content

Commit

Permalink
Work around inexplicable pipe error during build (#1888)
Browse files Browse the repository at this point in the history
For some reason, `head -n1` is resulting in exit code 141 despite being
protected by `trap '' PIPE`. This same pattern is used successfully in
the preceding logic. It is not clear why we are seeing this issue now,
or why trap is not behaving as expected.

This issue cannot be reproduced locally.

Disabling pipefail for this line is acceptable because the build does
not even use the results of this line on the release branch.

Note: This change should be reverted once the cause is understood.
  • Loading branch information
zjs authored Jul 19, 2018
1 parent 474b569 commit 247225e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions installer/build/build-ova.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ url=$(gsutil ls -l "gs://vic-engine-builds" | grep -v TOTAL | grep vic_ | sort -
setenv VICENGINE "$url"

#set Harbor
set +o pipefail
url=$(gsutil ls -l "gs://harbor-builds" | grep -v TOTAL | grep offline-installer | grep -v offline-installer-latest | sort -k2 -r | (trap '' PIPE; head -n1) | xargs | cut -d ' ' -f 3 | sed 's/gs:\/\//https:\/\/storage.googleapis.com\//')
set -o pipefail
setenv HARBOR "$url"

export BUILD_DCHPHOTON_VERSION="1.13"
Expand Down

0 comments on commit 247225e

Please sign in to comment.