-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/devel'
- Loading branch information
Showing
8 changed files
with
128 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
FROM ubuntu:16.04 | ||
|
||
WORKDIR /app | ||
|
||
# common packages | ||
RUN apt-get update && \ | ||
apt-get install -y \ | ||
build-essential cmake git wget && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# add ROS packages to apt package manager | ||
RUN sh -c 'echo "deb http://packages.ros.org/ros/ubuntu xenial main" > /etc/apt/sources.list.d/ros-latest.list' | ||
|
||
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116 | ||
|
||
# install ros | ||
RUN apt-get update && \ | ||
apt-get install -y ros-kinetic-ros-base | ||
|
||
# install arduino toolchain | ||
RUN wget -nv http://arduino.cc/download.php?f=/arduino-1.8.5-linux64.tar.xz -O arduino-1.8.5.tar.xz | ||
|
||
RUN tar -xf arduino-1.8.5.tar.xz && \ | ||
cd arduino-1.8.5 && \ | ||
mkdir -p /usr/share/arduino && \ | ||
cp -R * /usr/share/arduino |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,66 @@ | ||
#!groovy | ||
node('xenial') { | ||
try { | ||
stage('Checkout') { | ||
sh 'mkdir -p catkin_ws/src/roscco' | ||
dir('catkin_ws/src/roscco') | ||
{ | ||
checkout([ | ||
$class: 'GitSCM', | ||
branches: scm.branches, | ||
doGenerateSubmoduleConfigurations: false, | ||
extensions: scm.extensions + [[$class: 'CleanBeforeCheckout'], | ||
[$class: 'SubmoduleOption', | ||
disableSubmodules: false, | ||
parentCredentials: true, | ||
recursiveSubmodules: true, | ||
reference: '', | ||
trackingSubmodules: false]], | ||
submoduleCfg: [], | ||
userRemoteConfigs: scm.userRemoteConfigs | ||
]) | ||
} | ||
|
||
node() { | ||
def builds = [:] | ||
def platforms = [:] | ||
|
||
sh 'mkdir -p catkin_ws/src/roscco' | ||
dir('catkin_ws/src/roscco') { | ||
checkout scm | ||
sh "git submodule update --init --recursive" | ||
|
||
def image = docker.build("catkin_make-build:${env.BUILD_ID}") | ||
|
||
|
||
def output = image.inside { | ||
sh returnStdout: true, script: "cmake -LA ./oscc/firmware | grep 'VEHICLE_VALUES' | cut -d'=' -f 2" | ||
} | ||
|
||
platforms = output.trim().tokenize(';')\ | ||
} | ||
stage('Build') { | ||
parallel 'kia soul firmware': { | ||
sh '. /opt/ros/kinetic/setup.sh && cd catkin_ws && catkin_make -DKIA_SOUL=ON' | ||
} | ||
echo 'Build Complete!' | ||
|
||
for(int j=0; j<platforms.size(); j++) { | ||
def platform_idx = j | ||
def platform = platforms[platform_idx] | ||
builds[platform] = { | ||
node { | ||
sh 'mkdir -p catkin_ws/src/roscco' | ||
dir('catkin_ws/src/roscco') { | ||
checkout scm | ||
sh "git submodule update --init --recursive" | ||
} | ||
|
||
image = docker.build("catkin_make-build:${env.BUILD_ID}", "./catkin_ws/src/roscco") | ||
|
||
stage("Build ${platform}"){ | ||
image.inside { | ||
sh ". /opt/ros/kinetic/setup.sh && \ | ||
cd catkin_ws && \ | ||
catkin_make -DVEHICLE=${platform}" | ||
|
||
echo "${platform}: Build Complete!" | ||
} | ||
} | ||
|
||
def workspace = pwd() | ||
|
||
stage("Test ${platform}"){ | ||
image.inside{ | ||
sh ". /opt/ros/kinetic/setup.sh && \ | ||
cd catkin_ws && \ | ||
ROS_HOME=${workspace} ROS_LOG_DIR=${workspace} catkin_make run_tests -DVEHICLE=${platform} && \ | ||
catkin_test_results --verbose" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
stage('Test') { | ||
parallel 'kia soul tests': { | ||
sh '. /opt/ros/kinetic/setup.sh && cd catkin_ws && catkin_make run_tests -DKIA_SOUL=ON && catkin_test_results' | ||
echo 'ROS Tests Complete!' | ||
} | ||
|
||
try { | ||
parallel builds | ||
} | ||
stage('Release') { | ||
echo 'Release Package Created!' | ||
finally { | ||
deleteDir() | ||
} | ||
} | ||
finally { | ||
deleteDir() | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule oscc
updated
8 files
+50 −0 | Dockerfile | |
+67 −52 | Jenkinsfile | |
+25 −15 | README.md | |
+1 −1 | api/include/can_protocols/oscc.dbc | |
+8 −2 | api/include/vehicles/kia_niro.h | |
+13 −1 | api/include/vehicles/kia_soul_ev.h | |
+1 −1 | api/include/vehicles/kia_soul_petrol.h | |
+1 −4 | api/src/oscc.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters