Merge branch 'master' into 10576-cwl-keep-fetcher
[arvados.git] / build / run-build-packages-one-target.sh
index e5e7f0bfa4308bf5fb9c49b3bc24a6b7164812a8..16c7129d9b8efc0747da64f394366680f1ce4fc6 100755 (executable)
@@ -14,7 +14,9 @@ Syntax:
     Run package install test script "test-packages-$target.sh"
 --debug
     Output debug information (default: false)
---only-test
+--only-build <package>
+    Build only a specific package
+--only-test <package>
     Test only a specific package
 
 WORKSPACE=path         Path to the Arvados source tree to build packages from
@@ -40,7 +42,7 @@ if ! [[ -d "$WORKSPACE" ]]; then
 fi
 
 PARSEDOPTS=$(getopt --name "$0" --longoptions \
-    help,debug,test-packages,target:,command:,only-test: \
+    help,debug,test-packages,target:,command:,only-test:,only-build: \
     -- "" "$@")
 if [ $? -ne 0 ]; then
     exit 1
@@ -62,8 +64,12 @@ while [ $# -gt 0 ]; do
             TARGET="$2"; shift
             ;;
         --only-test)
+            test_packages=1
             packages="$2"; shift
             ;;
+        --only-build)
+            ONLY_BUILD="$2"; shift
+            ;;
         --debug)
             DEBUG=" --debug"
             ;;
@@ -86,11 +92,11 @@ done
 set -e
 
 if [[ -n "$test_packages" ]]; then
-    if [[ -n "$(find $WORKSPACE/packages/$TARGET -name *.rpm)" ]] ; then
+    if [[ -n "$(find $WORKSPACE/packages/$TARGET -name '*.rpm')" ]] ; then
         createrepo $WORKSPACE/packages/$TARGET
     fi
 
-    if [[ -n "$(find $WORKSPACE/packages/$TARGET -name *.deb)" ]] ; then
+    if [[ -n "$(find $WORKSPACE/packages/$TARGET -name '*.deb')" ]] ; then
         (cd $WORKSPACE/packages/$TARGET
          dpkg-scanpackages .  2> >(grep -v 'warning' 1>&2) | gzip -c > Packages.gz
         )
@@ -121,13 +127,17 @@ popd
 
 if test -z "$packages" ; then
     packages="arvados-api-server
-        arvados-data-manager
         arvados-docker-cleaner
         arvados-git-httpd
         arvados-node-manager
         arvados-src
         arvados-workbench
+        crunch-dispatch-local
+        crunch-dispatch-slurm
+        crunch-run
         crunchstat
+        keep-balance
+        keep-block-check
         keepproxy
         keep-rsync
         keepstore
@@ -186,6 +196,7 @@ else
     if docker run --rm \
         "${docker_volume_args[@]}" \
         --env ARVADOS_DEBUG=1 \
+        --env "ONLY_BUILD=$ONLY_BUILD" \
         "$IMAGE" $COMMAND
     then
         echo