[ARVADOS-DEV] created: 2fd85d96c5e8ea8e2418f46c2d53d5f71e0b70eb
git at public.curoverse.com
git at public.curoverse.com
Wed Jul 22 22:22:03 EDT 2015
at 2fd85d96c5e8ea8e2418f46c2d53d5f71e0b70eb (commit)
commit 2fd85d96c5e8ea8e2418f46c2d53d5f71e0b70eb
Author: Brett Smith <brett at curoverse.com>
Date: Wed Jul 22 22:21:59 2015 -0400
6682: Add script to orchestrate builds for multiple targets.
Now that we can build packages for multiple targets, it's nice to have
a one-shot script to build them all. This does that.
diff --git a/jenkins/run-build-packages-all-targets.sh b/jenkins/run-build-packages-all-targets.sh
new file mode 100755
index 0000000..a1052a9
--- /dev/null
+++ b/jenkins/run-build-packages-all-targets.sh
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+# Orchestrate run-build-packages.sh for every target.
+
+set -e
+
+FINAL_EXITCODE=0
+JENKINS_DIR=$(dirname "$(readlink -e "$0")")
+
+run_docker() {
+ local tag=$1; shift
+ if docker run -v "$JENKINS_DIR:/jenkins" -v "$WORKSPACE:/arvados" \
+ --env ARVADOS_DEBUG=1 "arvados/build:$tag"; 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
+
+for dockerfile_path in $(find -name Dockerfile); do
+ run_docker "$(basename $(dirname "$dockerfile_path"))"
+done
+
+exit $FINAL_EXITCODE
diff --git a/jenkins/run-build-packages.sh b/jenkins/run-build-packages.sh
index fc12cb4..b8e58d7 100755
--- a/jenkins/run-build-packages.sh
+++ b/jenkins/run-build-packages.sh
@@ -21,7 +21,7 @@ WORKSPACE=path Path to the Arvados source tree to build packages from
EOF
EXITCODE=0
-DEBUG=0
+DEBUG=${ARVADOS_DEBUG:-0}
BUILD_BUNDLE_PACKAGES=0
TARGET=debian7
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list