xtext-core/Jenkinsfile

27 lines
875 B
Text
Raw Normal View History

// tell Jenkins how to build projects from this repository
node {
try {
stage 'Checkout'
checkout scm
2016-11-23 13:36:33 +00:00
stage 'Gradle Build'
try {
2016-12-05 09:01:50 +00:00
sh "./gradlew -PuseJenkinsSnapshots=true clean build createLocalMavenRepo --refresh-dependencies --continue"
2016-11-23 13:36:33 +00:00
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/**/*.*'
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
}
}