From cb5452fcbbd4278119593160193ddd5a935dec70 Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Sun, 11 Jun 2017 10:50:42 +0200 Subject: [PATCH] Revert "travis: use travis_wait" This reverts commit cd39cd6fa8486fef01811725c3d303e9accc2fab. --- .travis/build-site.sh | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/.travis/build-site.sh b/.travis/build-site.sh index 63b120f3a8..c681625621 100644 --- a/.travis/build-site.sh +++ b/.travis/build-site.sh @@ -42,10 +42,22 @@ if [[ "$TRAVIS_TAG" != "" || "$VERSION" == *-SNAPSHOT ]]; then rsync -avh target/pmd-doc-${VERSION}.zip ${PMD_SF_USER}@web.sourceforge.net:/home/frs/project/pmd/pmd/${VERSION}/ fi -if [[ "$VERSION" == *-SNAPSHOT && "$TRAVIS_BRANCH" == "master" ]]; then - # this can take very long and no output is generated. therefore travis_wait is used. - # See https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received +( + if [[ "$VERSION" == *-SNAPSHOT && "$TRAVIS_BRANCH" == "master" ]]; then + # this can take very long and no output is generated. therefore use the background job again + export PING_SLEEP=30s + export BUILD_OUTPUT=/tmp/build-site-upload.out + export PING_PID_FILE=/tmp/build-site-upload-ping.pid - # Uploading snapshot site... - travis_wait 30 rsync -ah --stats --delete target/pmd-doc-${VERSION}/ ${PMD_SF_USER}@web.sourceforge.net:/home/project-web/pmd/htdocs/snapshot/ -fi + source .travis/background-job-funcs.sh + + # Uploading snapshot site... + rsync -ah --stats --delete target/pmd-doc-${VERSION}/ ${PMD_SF_USER}@web.sourceforge.net:/home/project-web/pmd/htdocs/snapshot/ + + # The build finished without returning an error so dump a tail of the output + dump_output + + # nicely terminate the ping output loop + kill_ping + fi +)