2016-09-17 01:28:03 +00:00
|
|
|
#!/usr/bin/env groovy
|
|
|
|
|
2016-09-17 02:56:17 +00:00
|
|
|
String mavenCommand = 'mvn clean install -Dmaven.test.failure.ignore=true'
|
2016-09-17 03:12:41 +00:00
|
|
|
String testReports = '**/target/surefire-reports/**/*.xml'
|
2016-09-17 02:56:17 +00:00
|
|
|
|
2016-09-17 03:12:41 +00:00
|
|
|
Map platforms = [:]
|
2016-09-17 03:10:16 +00:00
|
|
|
|
|
|
|
platforms['windows'] = {
|
2016-09-17 02:56:17 +00:00
|
|
|
node('windows') {
|
|
|
|
checkout scm
|
2016-09-17 02:57:54 +00:00
|
|
|
withEnv([
|
|
|
|
"JAVA_HOME=${tool 'jdk7'}",
|
|
|
|
"PATH+MAVEN=${tool 'mvn'}/bin",
|
|
|
|
]) {
|
2016-09-17 02:56:17 +00:00
|
|
|
bat mavenCommand
|
|
|
|
}
|
2016-09-17 03:10:16 +00:00
|
|
|
junit testReports
|
2016-09-17 02:56:17 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-09-17 03:10:16 +00:00
|
|
|
platforms['linux'] = {
|
2016-09-17 02:56:17 +00:00
|
|
|
node('linux') {
|
|
|
|
checkout scm
|
2016-09-17 02:57:54 +00:00
|
|
|
withEnv([
|
|
|
|
"JAVA_HOME=${tool 'jdk7'}",
|
|
|
|
"PATH+MAVEN=${tool 'mvn'}/bin",
|
|
|
|
]) {
|
2016-09-17 02:56:17 +00:00
|
|
|
sh mavenCommand
|
|
|
|
}
|
2016-09-17 03:10:16 +00:00
|
|
|
junit testReports
|
2016-09-17 01:28:03 +00:00
|
|
|
}
|
|
|
|
}
|
2016-09-17 03:10:16 +00:00
|
|
|
|
|
|
|
parallel(platforms)
|