Bug 1275276 - Fail if image context cannot be downloaded r=jhford
MozReview-Commit-ID: DGOfH3MF2Sb
--- a/testing/docker/image_builder/VERSION
+++ b/testing/docker/image_builder/VERSION
@@ -1,1 +1,1 @@
-0.1.4
+0.1.5
--- a/testing/docker/image_builder/bin/build_image.sh
+++ b/testing/docker/image_builder/bin/build_image.sh
@@ -16,17 +16,17 @@ raise_error() {
# Ensure that the PROJECT is specified so the image can be indexed
test -n "$PROJECT" || raise_error "Project must be provided."
test -n "$HASH" || raise_error "Context Hash must be provided."
mkdir /artifacts
if [ ! -z "$CONTEXT_URL" ]; then
mkdir /context
- if ! curl -L --retry 5 --connect-timeout 30 "$CONTEXT_URL" | tar -xz --strip-components 1 -C /context; then
+ if ! curl -L --retry 5 --connect-timeout 30 --fail "$CONTEXT_URL" | tar -xz --strip-components 1 -C /context; then
raise_error "Error downloading image context from decision task."
fi
CONTEXT_PATH=/context
else
tc-vcs checkout /home/worker/workspace/src $BASE_REPOSITORY $HEAD_REPOSITORY $HEAD_REV $HEAD_REF
CONTEXT_PATH=/home/worker/workspace/src/$CONTEXT_PATH
fi