-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathJenkinsfile
42 lines (35 loc) · 916 Bytes
/
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
node {
pythonPath = "PYTHONPATH=\$PYTHONPATH:/usr/lib/python2.7/dist-packages/"
def err = null
currentBuild.result = "SUCCESS"
try {
stage('Clean old Build'){
dir('catkin_ws/src') {
deleteDir()
}
}
stage('Checkout'){
checkout scm
}
stage('ROS-Build'){
dir ('catkin_ws/src') {
withEnv([pythonPath]) {
sh 'source /opt/ros/kinetic/setup.bash; catkin_init_workspace'
}
}
dir ('catkin_ws') {
withEnv([pythonPath]) {
sh 'source /opt/ros/kinetic/setup.bash; catkin_make'
}
}
}
} catch (caughtError) {
err = caughtError
currentBuild.result = "FAILURE"
step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: 'carstensen@rts.uni-hannover.de', sendToIndividuals: true])
} finally {
if (err) {
throw err
}
}
}