[ARVADOS] updated: 2.1.0-10-g82f7de720

Git user git at public.arvados.org
Wed Oct 21 15:28:00 UTC 2020


Summary of changes:
 build/run-build-docker-images.sh | 54 ++++++++++++++++++++++++++--------------
 1 file changed, 36 insertions(+), 18 deletions(-)

       via  82f7de72085b45832bddc64fec334cdfdc1e9a03 (commit)
      from  0041283b5fffd220ada3e7098a04b57a4389aebb (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 82f7de72085b45832bddc64fec334cdfdc1e9a03
Author: Ward Vandewege <ward at curii.com>
Date:   Wed Oct 21 11:10:00 2020 -0400

    16930: make run-build-docker-images.sh a little smarter, allow building
           just one type of arvbox images.
    
    Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <ward at curii.com>

diff --git a/build/run-build-docker-images.sh b/build/run-build-docker-images.sh
index fd7b38e8b..f0d1092b6 100755
--- a/build/run-build-docker-images.sh
+++ b/build/run-build-docker-images.sh
@@ -9,6 +9,7 @@ function usage {
     echo >&2
     echo >&2 "$0 options:"
     echo >&2 "  -t, --tags [csv_tags]         comma separated tags"
+    echo >&2 "  -i, --images [dev,demo]       Choose which images to build (default: dev and demo)"
     echo >&2 "  -u, --upload                  Upload the images (docker push)"
     echo >&2 "  -h, --help                    Display this help and exit"
     echo >&2
@@ -16,10 +17,11 @@ function usage {
 }
 
 upload=false
+images=dev,demo
 
 # NOTE: This requires GNU getopt (part of the util-linux package on Debian-based distros).
-TEMP=`getopt -o hut: \
-    --long help,upload,tags: \
+TEMP=`getopt -o hut:i: \
+    --long help,upload,tags:,images: \
     -n "$0" -- "$@"`
 
 if [ $? != 0 ] ; then echo "Use -h for help"; exit 1 ; fi
@@ -33,6 +35,19 @@ do
             upload=true
             shift
             ;;
+        -i | --images)
+            case "$2" in
+                "")
+                  echo "ERROR: --images needs a parameter";
+                  usage;
+                  exit 1
+                  ;;
+                *)
+                  images=$2;
+                  shift 2
+                  ;;
+            esac
+            ;;
         -t | --tags)
             case "$2" in
                 "")
@@ -128,37 +143,40 @@ timer_reset
 # clean up the docker build environment
 cd "$WORKSPACE"
 
-title "Starting arvbox build localdemo"
+if [[ "$images" =~ demo ]]; then
+  title "Starting arvbox build localdemo"
 
-tools/arvbox/bin/arvbox build localdemo
-ECODE=$?
+  tools/arvbox/bin/arvbox build localdemo
+  ECODE=$?
 
-if [[ "$ECODE" != "0" ]]; then
-    title "!!!!!! docker BUILD FAILED !!!!!!"
-    EXITCODE=$(($EXITCODE + $ECODE))
+  if [[ "$ECODE" != "0" ]]; then
+      title "!!!!!! docker BUILD FAILED !!!!!!"
+      EXITCODE=$(($EXITCODE + $ECODE))
+  fi
 fi
 
-title "Starting arvbox build dev"
+if [[ "$images" =~ dev ]]; then
+  title "Starting arvbox build dev"
 
-tools/arvbox/bin/arvbox build dev
+  tools/arvbox/bin/arvbox build dev
 
-ECODE=$?
+  ECODE=$?
 
-if [[ "$ECODE" != "0" ]]; then
-    title "!!!!!! docker BUILD FAILED !!!!!!"
-    EXITCODE=$(($EXITCODE + $ECODE))
+  if [[ "$ECODE" != "0" ]]; then
+      title "!!!!!! docker BUILD FAILED !!!!!!"
+      EXITCODE=$(($EXITCODE + $ECODE))
+  fi
 fi
 
 title "docker build complete (`timer`)"
 
-title "uploading images"
-
-timer_reset
-
 if [[ "$EXITCODE" != "0" ]]; then
     title "upload arvados images SKIPPED because build failed"
 else
     if [[ $upload == true ]]; then
+        title "uploading images"
+        timer_reset
+
         ## 20150526 nico -- *sometimes* dockerhub needs re-login
         ## even though credentials are already in .dockercfg
         docker login -u arvados

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list