update jenkinsfile

This commit is contained in:
Robin Mueller 2022-01-28 13:33:06 +01:00
parent 441b3b83c8
commit 386843e3e7
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814

View File

@ -1,25 +1,28 @@
pipeline { pipeline {
agent any agent any
environment { environment {
DOCKER_TAG = 'fsfw-build' DOCK_FILE_DIR = 'automation'
BUILDDIR = 'build-tests' BUILDDIR = 'build-tests'
} }
stages { stages {
stage('Build Container') { stage('Create Docker') {
agent {
dockerfile {
dir '$DOCK_FILE_DIR'
additionalBuildArgs '--no-cache'
}
}
when { when {
anyOf { anyOf {
changeset "automation/Dockerfile"; changeset "$DOCK_FILE_DIR/Dockerfile";
changelog 'cleanDocker' changelog 'cleanDocker'
} }
} }
steps {
sh 'docker build -t $DOCKER_TAG - < automation/Dockerfile'
}
} }
stage('Clean') { stage('Clean') {
agent { agent {
docker { dockerfile {
image '$DOCKER_TAG' dir '$DOCK_FILE_DIR'
reuseNode true reuseNode true
} }
} }
@ -36,8 +39,8 @@ pipeline {
} }
stage('Configure') { stage('Configure') {
agent { agent {
docker { dockerfile {
image '$DOCKER_TAG' dir '$DOCK_FILE_DIR'
reuseNode true reuseNode true
} }
} }
@ -49,8 +52,8 @@ pipeline {
} }
stage('Build') { stage('Build') {
agent { agent {
docker { dockerfile {
image '$DOCKER_TAG' dir '$DOCK_FILE_DIR'
reuseNode true reuseNode true
} }
} }
@ -62,8 +65,8 @@ pipeline {
} }
stage('Unittests') { stage('Unittests') {
agent { agent {
docker { dockerfile {
image '$DOCKER_TAG' dir '$DOCK_FILE_DIR'
reuseNode true reuseNode true
} }
} }
@ -75,8 +78,8 @@ pipeline {
} }
stage('Valgrind') { stage('Valgrind') {
agent { agent {
docker { dockerfile {
image '$DOCKER_TAG' dir '$DOCK_FILE_DIR'
reuseNode true reuseNode true
} }
} }