forked from eclipse/xtext-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
31 lines (26 loc) · 1.01 KB
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Tell Jenkins how to build projects from this repository
node {
try {
properties([
[$class: 'BuildDiscarderProperty', strategy: [$class: 'LogRotator', numToKeepStr: '15']]
])
stage 'Checkout'
checkout scm
stage 'Gradle Build'
try {
sh "./gradlew clean cleanGenerateXtext build createLocalMavenRepo -PuseJenkinsSnapshots=true -PcompileXtend=true --refresh-dependencies --continue"
} finally {
step([$class: 'JUnitResultArchiver', testResults: '**/build/test-results/test/*.xml'])
}
stage 'Maven Build'
def mvnHome = tool 'M3'
env.M2_HOME = "${mvnHome}"
dir('.m2/repository/org/eclipse/xtext') { deleteDir() }
sh "${mvnHome}/bin/mvn -f releng --batch-mode --update-snapshots -Dmaven.repo.local=.m2/repository 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
}
}