-
Notifications
You must be signed in to change notification settings - Fork 41
/
Jenkinsfile
48 lines (47 loc) · 1.78 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
def scmVars
@Library('jenkins-shared-lib') _
pipeline {
agent { label 'linux && java' }
options {
skipDefaultCheckout()
timeout(time: 12, unit: 'HOURS')
timestamps()
}
environment {
PATH = "${env.WORKSPACE}/releaseScripts/default/adds:${env.PATH}"
}
stages {
stage('Checkout') {
steps {
script {
scmVars = checkout scm
}
sh 'git clean -f -x -d'
}
}
stage('Check environment') {
steps {
sh(label: 'check solvers', script: 'releaseScripts/default/check_solvers.sh')
}
}
stage('Build and run basic tests') {
steps {
withMaven(options: [artifactsPublisher(disabled: true)]) {
sh 'cd trunk/source/BA_MavenParentUltimate && mvn -T 1C clean install'
}
}
}
}
post {
unsuccessful {
script { string mmMessage = mattermost.create_mattermost_message(scmVars) }
emailext(body: '$DEFAULT_CONTENT', mimeType: 'text/plain', recipientProviders: [culprits(), developers(), requestor()], replyTo: '[email protected]', subject: '$DEFAULT_SUBJECT')
mattermostSend(color: "${env.mm_color}", message: "${mmMessage}", text: '', channel: '#ultimate', icon: "https://jenkins.sopranium.de/static/0e41ff2a/images/jenkins-header-logo-v2.svg")
}
fixed {
script { string mmMessage = mattermost.create_mattermost_message(scmVars) }
emailext(body: '$DEFAULT_CONTENT', mimeType: 'text/plain', recipientProviders: [culprits(), developers(), requestor()], replyTo: '[email protected]', subject: '$DEFAULT_SUBJECT')
mattermostSend(color: "${env.mm_color}", message: "${mmMessage}", text: '', channel: '#ultimate', icon: "https://jenkins.sopranium.de/static/0e41ff2a/images/jenkins-header-logo-v2.svg")
}
}
}