From f3c3254f264dfe07c3af6d2f1ad66710c62f7b77 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Tue, 20 Mar 2018 16:54:19 +0100 Subject: [PATCH] Avoid Travis from failing if no logs during build of sonar-server --- travis-clock.sh | 14 ++++++++++++++ travis.sh | 7 +++++++ 2 files changed, 21 insertions(+) create mode 100755 travis-clock.sh diff --git a/travis-clock.sh b/travis-clock.sh new file mode 100755 index 00000000000..0561765150a --- /dev/null +++ b/travis-clock.sh @@ -0,0 +1,14 @@ +#!/bin/bash +RED='\033[0;31m' +NC='\033[0m' # No Color + +echo "start the clock" +while [ ! -f stop ]; do +  #echo "File not found!" +  seconds=60; date1=$((`date +%s` + $seconds)); +  while [ "$date1" -ge `date +%s` ]; do +    #echo -ne "$(date -u --date @$(($date1 - `date +%s` )) +%H:%M:%S)\r"; > /dev/null +    : #busy wait +  done +  printf "${RED}############# `date` ############${NC}\n" +done diff --git a/travis.sh b/travis.sh index 90e25585b6e..6ad35c597d3 100755 --- a/travis.sh +++ b/travis.sh @@ -58,6 +58,10 @@ else export PULL_REQUEST_NUMBER=$TRAVIS_PULL_REQUEST fi +# Hack to keep job alive even if no logs during more than 10 minutes. +# That can occur when uploading sonarqube.zip to Artifactory. +./travis-clock.sh & + case "$TARGET" in BUILD) @@ -145,3 +149,6 @@ WEB_TESTS) ;; esac + +#stop the clock +touch stop -- 2.39.5