Skip to content

Commit

Permalink
Use set -e in build script (#229)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbley authored Apr 15, 2024
1 parent 7a5c8fe commit da11ad0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions build-layer.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/bash -e

# Copyright Splunk Inc.
#
Expand All @@ -19,7 +19,9 @@ echo "Installing dependencies"
[[ -d /go/pkg/mod/cache ]] && exit 0
# retry up to 3 times in case of network issues
for i in $(seq 1 3); do
set +e
go mod download && break
set -e
sleep 10
done

Expand All @@ -33,4 +35,4 @@ CGO_ENABLED=0 gotestsum --format short-verbose --junitfile ~/testresults/unit.xm
# package the layer
echo "Packaging the layer"
apt update && apt install --assume-yes zip
make
make

0 comments on commit da11ad0

Please sign in to comment.