Skip to content

Commit

Permalink
[#101] Another attempt to get the pull request build to work while we…
Browse files Browse the repository at this point in the history
… look into issues with the HSQLDB lock file. This time explicitely set a project property for gradle and then pass it through as environment variable to the tests using test task. Seems like using -D from command line only passes it in to the JVM for the gradle build but gradle forks another JVM for the tests so it wasn't being passed through. Tested locally and seems to work... famous last words
  • Loading branch information
tgianos committed Mar 15, 2016
1 parent 36c7649 commit d72cbf6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ subprojects {
minHeapSize = "256m"
maxHeapSize = "1g"

if (project.hasProperty("TRAVIS_PULL_REQUEST")) {
systemProperty "TRAVIS_PULL_REQUEST", project.getProperty("TRAVIS_PULL_REQUEST")
}

reports.html.destination = file("${reporting.baseDir}/test/${task.name}")
jacocoTestReport.executionData += files("$buildDir/jacoco/${task.name}.exec")
}
Expand Down
2 changes: 1 addition & 1 deletion gradle/buildViaTravis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
echo -e "Build Pull Request #$TRAVIS_PULL_REQUEST => Branch [$TRAVIS_BRANCH]"
./gradlew build
./gradlew build -PTRAVIS_PULL_REQUEST=true
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then
echo -e 'Build Branch with Snapshot => Branch ['$TRAVIS_BRANCH']'
./gradlew -Prelease.travisci=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" build snapshot
Expand Down

0 comments on commit d72cbf6

Please sign in to comment.