forked from slightech/MYNT-EYE-D-SDK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
117 lines (114 loc) · 2.98 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
pipeline {
agent {
// docker { image 'ros:kinetic-ros-base-xenial' }
docker { image 'joinaero/kinetic-ros-opencv-xenial' }
}
stages {
stage('Prepare') {
steps {
echo "WORKSPACE: ${env.WORKSPACE}"
echo 'apt-get ..'
sh '''
apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
apt-get update
'''
}
}
stage('Init') {
steps {
echo 'make init ..'
sh 'make init INIT_OPTIONS=-y'
}
}
stage('Build') {
steps {
echo 'make build ..'
sh '. /opt/ros/kinetic/setup.sh; make build'
}
}
stage('Install') {
steps {
echo 'make install ..'
sh '. /opt/ros/kinetic/setup.sh; make install SUDO='
}
}
/*
stage('Test') {
steps {
echo 'make test ..'
sh '. /opt/ros/kinetic/setup.sh; make test SUDO='
}
}
*/
stage('Samples') {
steps {
echo 'make samples ..'
sh '''
apt-get install -y libasound2-dev
. /opt/ros/kinetic/setup.sh; make samples SUDO=
'''
}
}
/*
stage('Tools') {
steps {
echo 'make tools ..'
sh '. /opt/ros/kinetic/setup.sh; make tools SUDO='
}
}
*/
stage('ROS') {
steps {
echo 'make ros ..'
sh '''
. /opt/ros/kinetic/setup.sh
rosdep install --from-paths wrappers/ros/src --ignore-src --rosdistro kinetic -y
make ros SUDO=
'''
}
}
/*
stage('Clean') {
steps {
echo 'clean ..'
sh '''
rm -rf /var/lib/apt/lists/*
'''
}
}
*/
}
post {
always {
echo 'This will always run'
/*dingTalk accessToken: '7dca6ae9b1b159b8b4b375e858b71f2e6cec8f73fa20d07552d09791261b2344',
imageUrl: 'http://icon-park.com/imagefiles/loading7_gray.gif',
message: '开始构建',
jenkinsUrl: "${JENKINS_URL}"
*/
}
success {
echo 'This will run only if successful'
/*
dingTalk accessToken: '7dca6ae9b1b159b8b4b375e858b71f2e6cec8f73fa20d07552d09791261b2344',
imageUrl: 'http://icons.iconarchive.com/icons/paomedia/small-n-flat/1024/sign-check-icon.png',
message: '构建成功',
jenkinsUrl: "${JENKINS_URL}"
*/
}
failure {
echo 'This will run only if failed'
dingTalk accessToken: '7dca6ae9b1b159b8b4b375e858b71f2e6cec8f73fa20d07552d09791261b2344',
imageUrl: 'http://www.iconsdb.com/icons/preview/soylent-red/x-mark-3-xxl.png',
message: '构建失败',
jenkinsUrl: "${JENKINS_URL}"
}
unstable {
echo 'This will run only if the run was marked as unstable'
}
changed {
echo 'This will run only if the state of the Pipeline has changed'
echo 'For example, if the Pipeline was previously failing but is now successf'
}
}
}