-if [[ "$COMMAND" != "" ]]; then
- COMMAND="/usr/local/rvm/bin/rvm-exec default bash /jenkins/$COMMAND$DEBUG"
-fi
-
-FINAL_EXITCODE=0
-JENKINS_DIR=$(dirname "$(readlink -e "$0")")
-
-run_docker() {
- local tag=$1; shift
- if [[ "$COMMAND" != "" ]]; then
- COMMAND="$COMMAND --target $tag"
- fi
- if docker run -v "$JENKINS_DIR:/jenkins" -v "$WORKSPACE:/arvados" \
- --env ARVADOS_DEBUG=1 "arvados/build:$tag" $COMMAND; then
- # Success - nothing more to do.
- true
- else
- FINAL_EXITCODE=$?
- echo "ERROR: $tag build failed with exit status $FINAL_EXITCODE." >&2
- fi
-}
-
-# In case it's needed, build the containers. This costs just a few
-# seconds when the containers already exist, so it's not a big deal to
-# do it on each run.
-cd "$JENKINS_DIR/dockerfiles"
-time ./build-all-build-containers.sh