From 57280167a20fb74f67201cd89f26ffc86babc310 Mon Sep 17 00:00:00 2001 From: Ulrich Mohr Date: Thu, 17 Feb 2022 18:31:21 +0100 Subject: [PATCH] Updated Dockerfile and Jenkinsfile --- automation/{Dockerfile-q7s => Dockerfile} | 6 ++- automation/Jenkinsfile | 53 ++++++++--------------- 2 files changed, 22 insertions(+), 37 deletions(-) rename automation/{Dockerfile-q7s => Dockerfile} (75%) diff --git a/automation/Dockerfile-q7s b/automation/Dockerfile similarity index 75% rename from automation/Dockerfile-q7s rename to automation/Dockerfile index 207afa04..0c99750c 100644 --- a/automation/Dockerfile-q7s +++ b/automation/Dockerfile @@ -2,7 +2,9 @@ FROM ubuntu:focal RUN apt-get update RUN apt-get --yes upgrade -RUN apt-get --yes install cmake libgpiod-dev xz-utils nano curl +#tzdata is a dependency, won't install otherwise +ARG DEBIAN_FRONTEND=noninteractive +RUN apt-get --yes install cmake libgpiod-dev xz-utils nano curl git gcc g++ lcov valgrind # Q7S root filesystem, required for cross-compilation. RUN mkdir -p /usr/rootfs; \ @@ -15,4 +17,4 @@ curl https://buggy.irs.uni-stuttgart.de/eive/tools/gcc-arm-8.3-2019.03-x86_64-ar | tar -xz -C /usr/tools ENV Q7S_SYSROOT="/usr/rootfs/cortexa9hf-neon-xiphos-linux-gnueabi" -ENV PATH=$PATH:"/usr/tools/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin" +ENV PATH=$PATH:"/usr/tools/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin" \ No newline at end of file diff --git a/automation/Jenkinsfile b/automation/Jenkinsfile index 8d45b2d7..5e8be0c7 100644 --- a/automation/Jenkinsfile +++ b/automation/Jenkinsfile @@ -1,51 +1,34 @@ pipeline { - agent any + environment { + BUILDDIR_Q7 = 'build_q7', + BUILDDIR_LINUX = 'build_linux' + } + agent { + docker { image 'eive-obsw:d2'} + } stages { - stage('Build Container') { - when { - anyOf { - changeset "automation/Dockerfile-q7s" - branch 'develop'; - changelog 'cleanDocker' - } - } - steps { - sh 'docker build -t eive-fsw-build-q7s:gcc8 - < automation/Dockerfile-q7s' - - } - } stage('Clean') { - when { - anyOf { - changelog 'cleanCI' - changeset '*.cmake' - changeset 'CMakeLists.txt' - } - } steps { - sh 'rm -rf build-q7s-debug' + sh 'rm -rf $BUILDDIR_Q7' + sh 'rm -rf $BUILDDIR_LINUX' } } stage('Build Q7S') { - agent { - docker { - image 'eive-fsw-build-q7s:gcc8' - reuseNode true - } - } steps { - dir('build-q7s-debug') { - sh 'cmake -DTGT_BSP="arm/q7s" -DCMAKE_BUILD_TYPE=Debug -DFSFW_OSAL=linux ..' + dir(BUILDDIR_Q7) { + sh 'cmake -DTGT_BSP="arm/q7s" -DCMAKE_BUILD_TYPE=Debug ..' sh 'cmake --build . -j' } } } - stage('Deploy') { - when { - tag 'v*.*.*' - } + stage('Unittests') { steps { - sh 'echo Deploying' + dir(BUILDDIR_LINUX) { + sh 'cmake ..' + //to be used when unittests are merged... + //sh 'cmake --build -t eive-unittests . -j' + //sh './eive-unittests' + } } } }