]> source.dussan.org Git - sonarqube.git/commitdiff
Avoid Travis from failing if no logs during build of sonar-server
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Tue, 20 Mar 2018 15:54:19 +0000 (16:54 +0100)
committerSonarTech <sonartech@sonarsource.com>
Thu, 22 Mar 2018 11:37:49 +0000 (12:37 +0100)
travis-clock.sh [new file with mode: 0755]
travis.sh

diff --git a/travis-clock.sh b/travis-clock.sh
new file mode 100755 (executable)
index 0000000..0561765
--- /dev/null
@@ -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
index 90e25585b6e70b0ff4a9c08f534ca0a54d5b0cb5..6ad35c597d3d724b973ec16fcd72cbfde0f39ffd 100755 (executable)
--- 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