Execute our tests inside of a JDK8 container

This commit is contained in:
R. Tyler Croy 2016-08-03 22:56:43 -07:00
parent d7dcb3c1fd
commit 5918f13928
No known key found for this signature in database
GPG Key ID: 1426C7DC3F51E16F
1 changed files with 10 additions and 17 deletions

27
Jenkinsfile vendored
View File

@ -1,27 +1,20 @@
node {
stage 'Clean workspace'
/* Running on a fresh Docker instance makes this redundant, but just in
* case the host isn't configured to give us a new Docker image for every
* build, make sure we clean things before we do anything
*/
deleteDir()
#!/usr/bin/env groovy
node('docker') {
stage 'Cleanup workspace'
deleteDir()
stage 'Checkout source'
checkout scm
stage 'Build and test'
/* if we can't install everything we need for Ruby in less than 15 minutes
* we might as well just give up
*/
timeout(30) {
sh './gradlew -iS'
docker.image('java:8-jdk').inside {
timeout(30) {
sh './gradlew -iS'
}
}
stage 'Capture test results and artifacts'
step([$class: 'JUnitResultArchiver', testResults: 'build/test-results/**/*.xml'])
step([$class: 'ArtifactArchiver', artifacts: 'build/libs/*.jar,build/distributions/*.zip', fingerprint: true])
junit 'build/test-results/**/*.xml'
archiveArtifacts artifacts: 'build/libs/*.jar,build/distributions/*.zip', fingerprint: true
}
// vim: ft=groovy