diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2018-03-20 16:54:19 +0100 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2018-03-22 12:37:49 +0100 |
commit | f3c3254f264dfe07c3af6d2f1ad66710c62f7b77 (patch) | |
tree | fd070659569ca29f1e1d71a2675abb24c6a46bf3 | |
parent | 340b26f8db2c75cdf32454b8ef27e6f6bd4bb641 (diff) | |
download | sonarqube-f3c3254f264dfe07c3af6d2f1ad66710c62f7b77.tar.gz sonarqube-f3c3254f264dfe07c3af6d2f1ad66710c62f7b77.zip |
Avoid Travis from failing if no logs during build of sonar-server
-rwxr-xr-x | travis-clock.sh | 14 | ||||
-rwxr-xr-x | travis.sh | 7 |
2 files changed, 21 insertions, 0 deletions
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 |