2016-06-14 13:21:00 +00:00
|
|
|
// tell Jenkins how to build projects from this repository
|
|
|
|
node {
|
2016-06-16 13:41:48 +00:00
|
|
|
try {
|
|
|
|
stage 'Checkout'
|
|
|
|
checkout scm
|
2016-11-23 13:36:33 +00:00
|
|
|
|
|
|
|
stage 'Gradle Build'
|
|
|
|
try {
|
|
|
|
sh "./gradlew -PuseJenkinsSnapshots=true cleanLocalMavenRepo cleanLocalP2Repo clean build createLocalMavenRepo --refresh-dependencies --continue"
|
|
|
|
archive 'build/maven-repository/**/*.*'
|
|
|
|
} finally {
|
|
|
|
step([$class: 'JUnitResultArchiver', testResults: '**/build/test-results/test/*.xml'])
|
|
|
|
}
|
|
|
|
|
|
|
|
stage 'Maven Build'
|
|
|
|
def mvnHome = tool 'M3'
|
|
|
|
env.M2_HOME = "${mvnHome}"
|
|
|
|
sh "${mvnHome}/bin/mvn -f releng/pom.xml --batch-mode --update-snapshots clean install"
|
|
|
|
archive 'build/**/*.*'
|
2016-06-16 13:41:48 +00:00
|
|
|
|
|
|
|
slackSend "Build Succeeded - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
|
|
|
|
|
|
|
|
} catch (e) {
|
|
|
|
slackSend color: 'danger', message: "Build Failed - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
|
|
|
|
throw e
|
|
|
|
}
|
2016-06-14 13:21:00 +00:00
|
|
|
}
|