[ARVADOS-DEV] created: 3cb12c4c758357b5b05a3b0acc8a59cfddbfd15f
git at public.curoverse.com
git at public.curoverse.com
Fri Sep 4 09:54:10 EDT 2015
at 3cb12c4c758357b5b05a3b0acc8a59cfddbfd15f (commit)
commit 3cb12c4c758357b5b05a3b0acc8a59cfddbfd15f
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Fri Sep 4 09:34:50 2015 -0400
Add --only to run-build-packages-all-targets to build a single target.
diff --git a/jenkins/run-build-packages-all-targets.sh b/jenkins/run-build-packages-all-targets.sh
index 2761f9f..a88212b 100755
--- a/jenkins/run-build-packages-all-targets.sh
+++ b/jenkins/run-build-packages-all-targets.sh
@@ -1,15 +1,43 @@
#!/bin/bash
read -rd "\000" helpmessage <<EOF
-$(basename $0): Orchestrate run-build-packages.sh for every target
+$(basename $0): Orchestrate run-build-packages.sh for every
+target (default) or a single target (--only)
Syntax:
- WORKSPACE=/path/to/arvados $(basename $0)
+ WORKSPACE=/path/to/arvados $(basename $0) [--only target]
-WORKSPACE=path Path to the Arvados source tree to build packages from
+WORKSPACE=path Path to the Arvados source tree to build packages from
EOF
+while [[ -n "$1" ]]
+do
+ arg="$1"; shift
+ case "$arg" in
+ --help)
+ echo >&2 "$helpmessage"
+ echo >&2
+ echo >&2 "Available targets:"
+ for dockerfile_path in $(find -name Dockerfile); do
+ echo "$(basename $(dirname "$dockerfile_path"))" >&2
+ done
+
+ exit 1
+ ;;
+ --only)
+ only="$1"; skip[$1]=""; shift
+ ;;
+ *=*)
+ eval export $(echo $arg | cut -d= -f1)=\"$(echo $arg | cut -d= -f2-)\"
+ ;;
+ *)
+ echo >&2 "$0: Unrecognized option: '$arg'. Try: $0 --help"
+ exit 1
+ ;;
+ esac
+done
+
if ! [[ -n "$WORKSPACE" ]]; then
echo >&2 "$helpmessage"
echo >&2
@@ -41,8 +69,13 @@ run_docker() {
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
+if [[ -n "$only" ]]
+then
+ run_docker "$only"
+else
+ for dockerfile_path in $(find -name Dockerfile); do
+ run_docker "$(basename $(dirname "$dockerfile_path"))"
+ done
+fi
exit $FINAL_EXITCODE
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list