3 read -rd "\000" helpmessage <<EOF
4 $(basename $0): Orchestrate run-build-packages.sh for every target
7 WORKSPACE=/path/to/arvados $(basename $0)
9 WORKSPACE=path Path to the Arvados source tree to build packages from
13 if ! [[ -n "$WORKSPACE" ]]; then
14 echo >&2 "$helpmessage"
16 echo >&2 "Error: WORKSPACE environment variable not set"
24 JENKINS_DIR=$(dirname "$(readlink -e "$0")")
28 if docker run -v "$JENKINS_DIR:/jenkins" -v "$WORKSPACE:/arvados" \
29 --env ARVADOS_DEBUG=1 "arvados/build:$tag"; then
30 # Success - nothing more to do.
34 echo "ERROR: $tag build failed with exit status $FINAL_EXITCODE." >&2
38 # In case it's needed, build the containers. This costs just a few
39 # seconds when the containers already exist, so it's not a big deal to
41 cd "$JENKINS_DIR/dockerfiles"
42 time ./build-all-build-containers.sh
44 for dockerfile_path in $(find -name Dockerfile); do
45 run_docker "$(basename $(dirname "$dockerfile_path"))"