From 3c414726499e5729667e6f62a67ad5dd9d5bc7e9 Mon Sep 17 00:00:00 2001 From: Ulrich Mohr Date: Tue, 26 Oct 2021 20:30:22 +0200 Subject: [PATCH] tweaking Jenkinsfile --- automation/Jenkinsfile | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/automation/Jenkinsfile b/automation/Jenkinsfile index a90037f8..e5b5ecda 100644 --- a/automation/Jenkinsfile +++ b/automation/Jenkinsfile @@ -1,12 +1,10 @@ pipeline { agent any + environment { + BUILDDIR = 'build-unittests' + } stages { - stage('Clean') { - steps { - sh 'rm -rf build-unittests' - } - } - stage('Build') { + stage('Configure') { agent { dockerfile { dir 'automation' @@ -15,8 +13,21 @@ pipeline { } } steps { - dir('build-unittests') { + sh 'rm -rf $BUILDDIR' + dir($BUILDDIR) { sh 'cmake -DFSFW_OSAL=host -DFSFW_BUILD_UNITTESTS=ON ..' + } + } + } + stage('Build') { + agent { + dockerfile { + dir 'automation' + reuseNode true + } + } + steps { + dir($BUILDDIR) { sh 'cmake --build . -j' } } @@ -29,7 +40,7 @@ pipeline { } } steps { - dir('build-unittests') { + dir($BUILDDIR) { sh 'cmake --build . -- fsfw-tests_coverage -j' } }