From 19f9b0280c2ae45b4f029d9d852a8fb8631e79c8 Mon Sep 17 00:00:00 2001 From: Ulrich Mohr Date: Mon, 25 Oct 2021 14:59:16 +0200 Subject: [PATCH] added jenkins integration --- automation/Dockerfile | 8 ++++++++ automation/Jenkinsfile | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 automation/Dockerfile create mode 100644 automation/Jenkinsfile diff --git a/automation/Dockerfile b/automation/Dockerfile new file mode 100644 index 00000000..0526d8f0 --- /dev/null +++ b/automation/Dockerfile @@ -0,0 +1,8 @@ +FROM ubuntu:focal + +RUN apt-get update +RUN apt-get --yes upgrade + +#tzdata is a dependency, won't install otherwise +ARG DEBIAN_FRONTEND=noninteractive +RUN apt-get --yes install gcc g++ cmake lcov git nano diff --git a/automation/Jenkinsfile b/automation/Jenkinsfile new file mode 100644 index 00000000..a90037f8 --- /dev/null +++ b/automation/Jenkinsfile @@ -0,0 +1,38 @@ +pipeline { + agent any + stages { + stage('Clean') { + steps { + sh 'rm -rf build-unittests' + } + } + stage('Build') { + agent { + dockerfile { + dir 'automation' + additionalBuildArgs '--no-cache' + reuseNode true + } + } + steps { + dir('build-unittests') { + sh 'cmake -DFSFW_OSAL=host -DFSFW_BUILD_UNITTESTS=ON ..' + sh 'cmake --build . -j' + } + } + } + stage('Unittests') { + agent { + dockerfile { + dir 'automation' + reuseNode true + } + } + steps { + dir('build-unittests') { + sh 'cmake --build . -- fsfw-tests_coverage -j' + } + } + } + } +}