aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/ci
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/ci')
-rwxr-xr-xscripts/ci/build.sh14
1 files changed, 12 insertions, 2 deletions
diff --git a/scripts/ci/build.sh b/scripts/ci/build.sh
index 76d9a62a9c..6929dbfea2 100755
--- a/scripts/ci/build.sh
+++ b/scripts/ci/build.sh
@@ -135,13 +135,19 @@ function bazel_build() {
fi
setup_android_repositories
- ${BUILD_SCRIPT_PATH} ${BAZEL_COMPILE_TARGET:-all} || exit $?
+ retCode=0
+ ${BUILD_SCRIPT_PATH} ${BAZEL_COMPILE_TARGET:-all} || retCode=$?
+
+ # Exit for failure except for test failures (exit code 3).
+ if (( $retCode != 3 )); then
+ exit $retCode
+ fi
# Build the packages
./output/bazel --bazelrc=${BAZELRC:-/dev/null} --nomaster_bazelrc build \
--embed_label=${release_label} --stamp \
--workspace_status_command=scripts/ci/build_status_command.sh \
- //scripts/packages/...
+ //scripts/packages/... || exit $?
if [ -n "${1-}" ]; then
# Copy the results to the output directory
@@ -150,6 +156,10 @@ function bazel_build() {
cp bazel-bin/scripts/packages/install.sh $1/bazel-${release_label}-installer.sh
cp bazel-genfiles/scripts/packages/README.md $1/README.md
fi
+
+ if (( $retCode )); then
+ export BUILD_UNSTABLE=1
+ fi
}
# Generate a string from a template and a list of substitutions.