-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathJenkinsfile
48 lines (44 loc) · 1.08 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
node {
def buildUUID = UUID.randomUUID().toString()
try {
stage('Pre-build') {
checkout scm
sh 'git submodule update --init --recursive'
}
stage 'Build'
def image = docker.build(buildUUID)
stage('Lint') {
image.inside {
sh './lintit.sh'
}
}
stage('Test') {
image.inside {
sh '''
. /opt/magellan-deps/devel/setup.sh
. /robot/devel/setup.sh
catkin_make
catkin_make run_tests
'''
}
}
stage('Build Teensy') {
image.inside {
sh '''
. /opt/magellan-deps/devel/setup.sh
. /robot/devel/setup.sh
/robot/src/magellan_firmware/compile.sh
'''
}
}
}
catch (ex) {
currentBuild.result = 'FAILURE'
}
finally {
stage('Cleanup') {
cleanWs()
sh "docker rmi ${buildUUID}"
}
}
}