Merge pull request 'Adding code for CI with docker and jenkins' (#520) from mohr_ci into development
All checks were successful
fsfw/fsfw/pipeline/head This commit looks good

Reviewed-on: #520
This commit is contained in:
Ulrich Mohr 2021-10-27 20:52:57 +02:00
commit c6bbc19b85

View File

@ -1,12 +1,10 @@
pipeline {
agent any
environment {
BUILDDIR = 'build-unittests'
}
stages {
stage('Clean') {
steps {
sh 'rm -rf build-unittests'
}
}
stage('Build') {
stage('Create Docker') {
agent {
dockerfile {
dir 'automation'
@ -15,8 +13,31 @@ pipeline {
}
}
steps {
dir('build-unittests') {
sh 'rm -rf $BUILDDIR'
}
}
stage('Configure') {
agent {
dockerfile {
dir 'automation'
reuseNode true
}
}
steps {
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 +50,7 @@ pipeline {
}
}
steps {
dir('build-unittests') {
dir(BUILDDIR) {
sh 'cmake --build . -- fsfw-tests_coverage -j'
}
}