From bb19c2bc8b88dc9a244e2d4ab35ff8396eb3a362 Mon Sep 17 00:00:00 2001
From: Nuno Marques <n.marques21@hotmail.com>
Date: Tue, 26 Jun 2018 06:15:13 +0100
Subject: [PATCH] Jenkins: add LPE CI test (#9762)

---
 Jenkinsfile | 57 +++++++++++++++++++++++++++++++++++++++++------------
 1 file changed, 44 insertions(+), 13 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 6055fff715..c0c96ad547 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -9,7 +9,7 @@ pipeline {
 
           def docker_base = "px4io/px4-dev-base:2018-03-30"
           def docker_nuttx = "px4io/px4-dev-nuttx:2018-03-30"
-          def docker_ros = "px4io/px4-dev-ros:2018-03-30"
+          def docker_ros = "px4io/px4-dev-ros:2018-06-19"
           def docker_rpi = "px4io/px4-dev-raspi:2018-03-30"
           def docker_armhf = "px4io/px4-dev-armhf:2017-12-30"
           def docker_arch = "px4io/px4-dev-base-archlinux:2018-03-30"
@@ -248,7 +248,7 @@ pipeline {
         stage('test mission (code coverage)') {
           agent {
             docker {
-              image 'px4io/px4-dev-ros:2018-03-30'
+              image 'px4io/px4-dev-ros:2018-06-19'
               args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
             }
           }
@@ -287,7 +287,7 @@ pipeline {
         // stage('tests (code coverage)') {
         //   agent {
         //     docker {
-        //       image 'px4io/px4-dev-ros:2018-03-30'
+        //       image 'px4io/px4-dev-ros:2018-06-19'
         //       args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
         //     }
         //   }
@@ -327,7 +327,7 @@ pipeline {
         stage('ROS vtol standard mission') {
           agent {
             docker {
-              image 'px4io/px4-dev-ros:2018-03-30'
+              image 'px4io/px4-dev-ros:2018-06-19'
               args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
             }
           }
@@ -361,7 +361,7 @@ pipeline {
         stage('ROS vtol tailsitter mission') {
           agent {
             docker {
-              image 'px4io/px4-dev-ros:2018-03-30'
+              image 'px4io/px4-dev-ros:2018-06-19'
               args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
             }
           }
@@ -395,7 +395,7 @@ pipeline {
         stage('ROS vtol tiltrotor mission') {
           agent {
             docker {
-              image 'px4io/px4-dev-ros:2018-03-30'
+              image 'px4io/px4-dev-ros:2018-06-19'
               args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
             }
           }
@@ -429,7 +429,7 @@ pipeline {
         stage('ROS vtol mission new 2') {
           agent {
             docker {
-              image 'px4io/px4-dev-ros:2018-03-30'
+              image 'px4io/px4-dev-ros:2018-06-19'
               args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
             }
           }
@@ -463,7 +463,7 @@ pipeline {
         stage('ROS vtol mission old 1') {
           agent {
             docker {
-              image 'px4io/px4-dev-ros:2018-03-30'
+              image 'px4io/px4-dev-ros:2018-06-19'
               args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
             }
           }
@@ -497,7 +497,7 @@ pipeline {
         stage('ROS vtol mission old 2') {
           agent {
             docker {
-              image 'px4io/px4-dev-ros:2018-03-30'
+              image 'px4io/px4-dev-ros:2018-06-19'
               args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
             }
           }
@@ -528,10 +528,10 @@ pipeline {
           }
         }
 
-        stage('ROS MC mission box') {
+        stage('ROS MC mission box (EKF2)') {
           agent {
             docker {
-              image 'px4io/px4-dev-ros:2018-03-30'
+              image 'px4io/px4-dev-ros:2018-06-19'
               args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
             }
           }
@@ -562,10 +562,41 @@ pipeline {
           }
         }
 
+	stage('ROS MC mission box (LPE)') {
+          agent {
+            docker {
+              image 'px4io/px4-dev-ros:2018-06-19'
+              args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
+            }
+          }
+          options {
+            skipDefaultCheckout()
+          }
+          steps {
+            sh 'export'
+            sh 'rm -rf build; rm -rf px4-posix_sitl_default*; rm -rf .ros; rm -rf .gazebo'
+            unstash 'px4_sitl_package'
+            sh 'tar -xjpvf build/posix_sitl_default/px4-posix_sitl_default*.bz2'
+            sh 'px4-posix_sitl_default*/px4/test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=multirotor_box vehicle:=iris est:=lpe'
+          }
+          post {
+            always {
+              sh 'px4-posix_sitl_default*/px4/Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg'
+              deleteDir()
+            }
+            failure {
+              sh 'ls -a'
+              archiveArtifacts '.ros/**/*.ulg'
+              archiveArtifacts '.ros/**/rosunit-*.xml'
+              archiveArtifacts '.ros/**/rostest-*.log'
+            }
+          }
+        }
+
         stage('ROS offboard att') {
           agent {
             docker {
-              image 'px4io/px4-dev-ros:2018-03-30'
+              image 'px4io/px4-dev-ros:2018-06-19'
               args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
             }
           }
@@ -599,7 +630,7 @@ pipeline {
         stage('ROS offboard pos') {
           agent {
             docker {
-              image 'px4io/px4-dev-ros:2018-03-30'
+              image 'px4io/px4-dev-ros:2018-06-19'
               args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
             }
           }
-- 
GitLab