tweaking Jenkinsfile

This commit is contained in:
Ulrich Mohr 2021-10-26 20:30:22 +02:00
parent da19764232
commit 3c41472649

View File

@ -1,12 +1,10 @@
pipeline { pipeline {
agent any agent any
environment {
BUILDDIR = 'build-unittests'
}
stages { stages {
stage('Clean') { stage('Configure') {
steps {
sh 'rm -rf build-unittests'
}
}
stage('Build') {
agent { agent {
dockerfile { dockerfile {
dir 'automation' dir 'automation'
@ -15,8 +13,21 @@ pipeline {
} }
} }
steps { steps {
dir('build-unittests') { sh 'rm -rf $BUILDDIR'
dir($BUILDDIR) {
sh 'cmake -DFSFW_OSAL=host -DFSFW_BUILD_UNITTESTS=ON ..' sh 'cmake -DFSFW_OSAL=host -DFSFW_BUILD_UNITTESTS=ON ..'
}
}
}
stage('Build') {
agent {
dockerfile {
dir 'automation'
reuseNode true
}
}
steps {
dir($BUILDDIR) {
sh 'cmake --build . -j' sh 'cmake --build . -j'
} }
} }
@ -29,7 +40,7 @@ pipeline {
} }
} }
steps { steps {
dir('build-unittests') { dir($BUILDDIR) {
sh 'cmake --build . -- fsfw-tests_coverage -j' sh 'cmake --build . -- fsfw-tests_coverage -j'
} }
} }