forked from phoedos/pmd
travis: run site upload in background job to mitigate no-output problem
This commit is contained in:
@ -12,7 +12,7 @@ if ! travis_isPush; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
(
|
||||||
export PING_SLEEP=30s
|
export PING_SLEEP=30s
|
||||||
export BUILD_OUTPUT=/tmp/build-site.out
|
export BUILD_OUTPUT=/tmp/build-site.out
|
||||||
export PING_PID_FILE=/tmp/build-site-ping.pid
|
export PING_PID_FILE=/tmp/build-site-ping.pid
|
||||||
@ -28,7 +28,7 @@ dump_output
|
|||||||
|
|
||||||
# nicely terminate the ping output loop
|
# nicely terminate the ping output loop
|
||||||
kill_ping
|
kill_ping
|
||||||
|
)
|
||||||
|
|
||||||
# create pmd-doc archive
|
# create pmd-doc archive
|
||||||
(
|
(
|
||||||
@ -42,8 +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}/
|
rsync -avh target/pmd-doc-${VERSION}.zip ${PMD_SF_USER}@web.sourceforge.net:/home/frs/project/pmd/pmd/${VERSION}/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
(
|
||||||
if [[ "$VERSION" == *-SNAPSHOT && "$TRAVIS_BRANCH" == "master" ]]; then
|
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
|
||||||
|
|
||||||
|
source .travis/background-job-funcs.sh
|
||||||
|
|
||||||
# Uploading snapshot site...
|
# Uploading snapshot site...
|
||||||
rsync -ah --stats --delete target/pmd-doc-${VERSION}/ ${PMD_SF_USER}@web.sourceforge.net:/home/project-web/pmd/htdocs/snapshot/
|
rsync -ah --stats --delete target/pmd-doc-${VERSION}/ ${PMD_SF_USER}@web.sourceforge.net:/home/project-web/pmd/htdocs/snapshot/
|
||||||
fi
|
|
||||||
|
|
||||||
|
# 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
|
||||||
|
)
|
||||||
|
Reference in New Issue
Block a user