added Jenkinsfile, moved together with Dockerfile into automation folder
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit

having the automation files in an empty folder accelerates docker build.
Also, I think these files are not related to the source code and as such should live in their own space
This commit is contained in:
2021-07-29 12:06:14 +02:00
parent 664f8e84b9
commit 6361fcb6bb
3 changed files with 67 additions and 35 deletions

18
automation/Dockerfile-q7s Normal file
View File

@ -0,0 +1,18 @@
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"

49
automation/Jenkinsfile vendored Normal file
View File

@ -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 -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DFSFW_OSAL=linux ..'
sh 'cmake --build . -j'
}
}
}
stage('Deploy') {
when {
tag 'v*.*.*'
}
steps {
sh 'echo Deploying'
}
}
}
}