Update jenkinsfile

This commit is contained in:
John Zhao 2018-10-24 16:47:29 +08:00
parent 8c016597d2
commit 1529e77ffd

24
Jenkinsfile vendored
View File

@ -1,8 +1,16 @@
pipeline { pipeline {
agent { agent {
docker { image 'ros:kinetic-ros-core-xenial' } // docker { image 'ros:kinetic-ros-core-xenial' }
docker { image 'ros:kinetic-ros-base-xenial' }
} }
/*
environment {
// FindOpenCV.cmake
OpenCV_DIR = '/opt/ros/kinetic/share/OpenCV-3.3.1-dev'
}
*/
stages { stages {
stage('Prepare') { stage('Prepare') {
steps { steps {
@ -11,7 +19,6 @@ pipeline {
sh ''' sh '''
apt-get update apt-get update
apt-get install -y ros-kinetic-opencv3 apt-get install -y ros-kinetic-opencv3
export OpenCV_DIR=/opt/ros/kinetic/share/OpenCV-3.3.1-dev
''' '''
} }
} }
@ -19,42 +26,45 @@ pipeline {
steps { steps {
echo 'make init ..' echo 'make init ..'
sh 'make init INIT_OPTIONS=-y' sh 'make init INIT_OPTIONS=-y'
// echo 'skip get submodules and make test'
// sh './scripts/init.sh -y'
} }
} }
stage('Build') { stage('Build') {
steps { steps {
echo 'make build ..' echo 'make build ..'
sh 'make build' sh '. /opt/ros/kinetic/setup.sh; make build'
} }
} }
stage('Install') { stage('Install') {
steps { steps {
echo 'make install ..' echo 'make install ..'
sh 'make install SUDO=' sh '. /opt/ros/kinetic/setup.sh; make install SUDO='
} }
} }
stage('Test') { stage('Test') {
steps { steps {
echo 'make test ..' echo 'make test ..'
sh 'make test SUDO=' sh '. /opt/ros/kinetic/setup.sh; make test SUDO='
} }
} }
stage('Samples') { stage('Samples') {
steps { steps {
echo 'make samples ..' echo 'make samples ..'
sh 'make samples SUDO=' sh '. /opt/ros/kinetic/setup.sh; make samples SUDO='
} }
} }
stage('Tools') { stage('Tools') {
steps { steps {
echo 'make tools ..' echo 'make tools ..'
sh 'make tools SUDO=' sh '. /opt/ros/kinetic/setup.sh; make tools SUDO='
} }
} }
stage('ROS') { stage('ROS') {
steps { steps {
echo 'make ros ..' echo 'make ros ..'
sh ''' sh '''
. /opt/ros/kinetic/setup.sh
rosdep install --from-paths wrappers/ros/src --ignore-src --rosdistro kinetic -y rosdep install --from-paths wrappers/ros/src --ignore-src --rosdistro kinetic -y
make ros SUDO= make ros SUDO=
''' '''