-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
63 lines (63 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
pipeline {
agent {
docker {
image 'amiller27/iarc7-base'
args '-u root'
}
}
stages {
stage ('Setup-Workspace') {
steps {
sh '''
set -x
cd ~
mkdir -p catkin_ws/src
cd catkin_ws/src
source /opt/ros/kinetic/setup.bash
catkin_init_workspace
cd ..
catkin_make
source devel/setup.bash
cd src
ln -s $WORKSPACE jenkins_test_package
'''
}
}
stage ('Setup-Dependencies') {
steps {
sh '''
set -x
cd ~/catkin_ws/src
wstool init
if [[ -f "$WORKSPACE/dependencies.rosinstall" ]]; then
wstool merge "$WORKSPACE/dependencies.rosinstall"
fi
wstool update
cd ..
apt-get update
rosdep install -y --from-paths src --ignore-src --rosdistro kinetic
'''
}
}
stage ('Build') {
steps {
sh '''
set -x
source /opt/ros/kinetic/setup.bash
cd ~/catkin_ws
catkin_make
'''
}
}
stage ('Test') {
steps {
sh '''
set -x
cd ~/catkin_ws
source devel/setup.bash
catkin_make run_tests && catkin_make test
'''
}
}
}
}