Merge pull request 'Adding code for CI with docker and jenkins' (#520) from mohr_ci into development

Reviewed-on: fsfw/fsfw#520
This commit is contained in:
Ulrich Mohr 2021-10-27 20:52:57 +02:00
commit c6bbc19b85
1 changed files with 29 additions and 8 deletions

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'
}
}