[beast: 2/5] MISC: Dockerfile-apt.in: just issue a warning if the final test installation fails



commit f7a70c0c242af7f6826682249f0d8f31f1739ee6
Author: Tim Janik <timj gnu org>
Date:   Fri Oct 28 00:08:34 2016 +0200

    MISC: Dockerfile-apt.in: just issue a warning if the final test installation fails
    
    Sometimes bintray.com takes its time to index new packages, so an
    installation test immediately after upload can fail even if everything went
    right. We still leave the test in place for informative logs but don't want
    the whole integration build to error out because of this glitch.
    
    Signed-off-by: Tim Janik <timj gnu org>

 misc/Dockerfile-apt.in |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/misc/Dockerfile-apt.in b/misc/Dockerfile-apt.in
index c595b2e..9f8aeca 100644
--- a/misc/Dockerfile-apt.in
+++ b/misc/Dockerfile-apt.in
@@ -8,7 +8,8 @@ MAINTAINER Tim Janik <timj gnu org>
 ENV DEBIAN_FRONTEND noninteractive
 RUN echo '#!/bin/bash\n"$@" || { sleep 10 ; "$@" ; } || { sleep 90 ; "$@" ; }' > /bin/retry && \
     echo '#!/bin/sh\ncase "$INTENT" in *$1*) echo true ;; *) echo "exit 0" ;; esac' > /bin/intent && \
-    chmod +x /bin/retry /bin/intent && \
+    echo '#!/bin/sh\nprintf "\\033[31;1m"\nprintf %s "$*" | sed '\''1{h;s/./*/g;p;x;};${p;x}'\'' >&2\nprintf 
"\\033[0m\\n"' > /bin/warn && \
+    chmod +x /bin/retry /bin/intent /bin/warn && \
     echo '\n' \
     "\nalias ls='ls --color=auto' ; alias l='ls -al' ;" \
     "\nalias grep='grep --color=auto' ; alias fgrep='fgrep --color=auto' ; alias egrep='egrep --color=auto' 
;" \
@@ -132,7 +133,8 @@ RUN `intent bintrayup` && \
     sleep 60 && \
     echo "deb [trusted=yes] https://dl.bintray.com/$BINTRAY_REPO $DISTRELEASE main" | \
        tee /etc/apt/sources.list.d/bintray-source-line.list && \
-    retry /bin/sh -c 'apt-get update && apt-get install -y beast libbse-dev'
+    retry /bin/sh -c 'apt-get update && apt-get install -y beast libbse-dev' || \
+       warn '* WARNING: Failed package installation after bintray.com upload *'
 
 # docker build -t @PROJECT@ .
 # docker run -ti --rm @PROJECT@ /bin/bash


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]