Adding Jenkinsfile for 9.2.x

This commit is contained in:
Joakim Erdfelt 2016-07-28 12:00:24 -07:00
parent 0b18340179
commit 428be69dc0
1 changed files with 34 additions and 0 deletions

34
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,34 @@
node {
// System Dependent Locations
def mvntool = tool name: 'maven3', type: 'hudson.tasks.Maven$MavenInstallation'
def jdktool = tool name: 'jdk7', type: 'hudson.model.JDK'
// Environment
List mvnEnv = ["PATH+MVN=${mvntool}/bin", "PATH+JDK=${jdktool}/bin", "JAVA_HOME=${jdktool}/", "MAVEN_HOME=${mvntool}"]
mvnEnv.add("MAVEN_OPTS=-Xms256m -Xmx1024m -Djava.awt.headless=true")
stage 'Checkout'
checkout scm
stage 'Compile'
withEnv(mvnEnv) {
sh "mvn -B clean install -Dtest=None"
}
stage 'Javadoc'
withEnv(mvnEnv) {
sh "mvn -B javadoc:javadoc"
}
stage 'Test'
withEnv(mvnEnv) {
// Run package then test phase / skip main compilation / ignore failures
sh "mvn -B package test -Dmaven.main.skip=true -Dmaven.test.failure.ignore=true"
// Report failures in the jenkins UI
step([$class: 'JUnitResultArchiver', testResults: '**/target/surefire-reports/TEST-*.xml'])
}
}