diff --git a/automation/Dockerfile-q7s b/automation/Dockerfile-q7s new file mode 100644 index 00000000..21b56439 --- /dev/null +++ b/automation/Dockerfile-q7s @@ -0,0 +1,19 @@ +FROM ubuntu:focal + +RUN apt-get update +RUN apt-get --yes upgrade +RUN apt-get --yes install cmake libgpiod-dev xz-utils nano curl + +# Q7S root filesystem, required for cross-compilation. +RUN mkdir -p /usr/rootfs; \ +curl https://buggy.irs.uni-stuttgart.de/eive/tools/cortexa9hf-neon-xiphos-linux-gnueabi.tar.gz \ + | tar -xz -C /usr/rootfs + +# Cross compiler +RUN mkdir -p /usr/tools; \ +curl https://buggy.irs.uni-stuttgart.de/eive/tools/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf.tar.gz \ + | 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" diff --git a/automation/Jenkinsfile b/automation/Jenkinsfile new file mode 100644 index 00000000..7b184280 --- /dev/null +++ b/automation/Jenkinsfile @@ -0,0 +1,49 @@ +pipeline { + agent any + stages { + stage('Build Container') { + when { + changeset "automation/Dockerfile-q7s" + branch 'develop' + } + 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' + } + } + 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 ..' + sh 'cmake --build . -j' + } + } + } + stage('Deploy') { + when { + tag 'v*.*.*' + } + steps { + sh 'echo Deploying' + } + } + } +} diff --git a/bsp_q7s/Dockerfile b/bsp_q7s/Dockerfile deleted file mode 100644 index 04184c4a..00000000 --- a/bsp_q7s/Dockerfile +++ /dev/null @@ -1,35 +0,0 @@ -FROM ubuntu:latest -# FROM alpine:latest - -ENV TZ=Europe/Berlin -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone - -RUN apt-get update && apt-get install -y curl cmake g++ - -# Q7S root filesystem, required for cross-compilation. Use IPv6 for curl -RUN mkdir -p /usr/rootfs; \ - curl -6 https://eive-cloud.irs.uni-stuttgart.de/index.php/s/dnfMy9kGpgynN6J/download/cortexa9hf-neon-xiphos-linux-gnueabi.tar.gz \ - | tar xvz -C /usr/rootfs -# Q7S C++ cross-compiler. Use IPv6 for curl -RUN mkdir -p /usr/tools; \ - curl -6 https://eive-cloud.irs.uni-stuttgart.de/index.php/s/RMsbHydJc6PSqcz/download/gcc-arm-linux-gnueabi.tar.gz \ - | tar xvz -C /usr/tools - -# RUN apk add cmake make g++ - -# Required for cmake build -ENV Q7S_SYSROOT="/usr/rootfs/cortexa9hf-neon-xiphos-linux-gnueabi" -ENV PATH=$PATH:"/usr/tools/gcc-arm-linux-gnueabi/bin" - -WORKDIR /usr/src/app -COPY . . - -RUN set -ex; \ - rm -rf build-q7s; \ - mkdir build-q7s; \ - cd build-q7s; \ - cmake -DCMAKE_BUILD_TYPE=Release -DOS_FSFW=linux -DTGT_BSP="arm/q7s" ..; - -ENTRYPOINT ["cmake", "--build", "build-q7s"] -CMD ["-j"] -# CMD ["bash"]