-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
52 lines (52 loc) · 1.34 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
pipeline {
agent any
stages {
stage('Run tests') {
steps {
sh 'python -m unittest discover -s tests -v'
}
}
stage('Print + list current directory') {
steps {
sh 'pwd'
sh 'ls -al'
}
}
stage('Show ROS environment variables') {
steps {
sh 'env | grep ROS'
}
}
stage('Move the robot') {
steps {
sh '''
roslaunch publisher_example move.launch &
MOVE_ID=$!
sleep 30s
kill $MOVE_ID
'''
}
}
stage('Stop the robot') {
steps {
sh '''
roslaunch publisher_example stop.launch &
STOP_ID=$!
sleep 5s
kill $STOP_ID
'''
}
}
stage('Reset the simulation') {
steps {
sh 'rosservice call /gazebo/reset_simulation "{}"'
}
}
stage('Done') {
steps {
sleep 5
echo 'Pipeline completed'
}
}
}
}