This repository has been archived by the owner on Nov 9, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add config file for public travis CI
Added a script for Travis to build xenon in background and log output in a file. This is workaround for limitation of Travis which does not allow log output to be more than 4MB for better UI and API experience. But xenon tests output more than 4MB of logs. After the build is completed, this script outputs last 1000 lines for debugging purpose. Also updated git-commit-id-plugin with latest version because old version was not working good on travis CI and was throwing errors Change-Id: I466a5a23fcbe5107f06e0999473757b5e9b3350a
- Loading branch information
Touseef Liaqat
authored and
Gerrit Code Review
committed
May 4, 2017
1 parent
367b01e
commit bd733f9
Showing
4 changed files
with
52 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
language: java | ||
sudo: required | ||
install: true | ||
dist: trusty | ||
|
||
jdk: | ||
- oraclejdk8 | ||
|
||
script: | ||
- ./bg-build.sh | ||
|
||
cache: | ||
directories: | ||
- '$HOME/.m2/repository' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/bash | ||
# Script to build xenon in background for Travis CI. | ||
# Travis CI does not allow output log to be more than 4MB. To overcome this | ||
# limitation we run the mvn build command in background in this script | ||
# and redirect the output in a log file. At the end of build we print last | ||
# few lines from the log file on to the console for debugging purpose. | ||
|
||
set -ex | ||
|
||
export WORKING_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
export OUTPUT_FILE=$WORKING_DIR/output.out | ||
touch $OUTPUT_FILE | ||
|
||
print_output() { | ||
echo "Last 1000 lines of output:" | ||
tail -1000 $OUTPUT_FILE | ||
} | ||
|
||
handle_error() { | ||
echo "ERROR: Caught an error in the build." | ||
print_output | ||
exit 1 | ||
} | ||
|
||
trap 'handle_error' ERR | ||
|
||
bash -c "while true; do echo \$(date) - building xenon...; sleep 30s; done" & | ||
LOOP_PID=$! | ||
|
||
./mvnw install -P coverage >> $OUTPUT_FILE 2>&1 | ||
|
||
print_output | ||
kill -9 $LOOP_PID |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters