Skip to content

Commit

Permalink
Build output directory env var
Browse files Browse the repository at this point in the history
  • Loading branch information
ref-humbold committed Jun 8, 2023
1 parent 83e99af commit 27d6ba1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ pipeline {

environment {
BUILD_DIR = "build"
BUILD_OUTPUT_DIR = "buildOut"
}

options {
Expand All @@ -31,7 +32,7 @@ pipeline {
stage("Build") {
steps {
echo "#INFO: Building project"
dir("${BUILD_DIR}") {
dir("${env.BUILD_DIR}") {
sh "cmake .. && make -s"
}
}
Expand All @@ -40,7 +41,7 @@ pipeline {
stage("Unit tests") {
steps {
echo "#INFO: Running unit tests"
dir("${BUILD_DIR}") {
dir("${env.BUILD_DIR}") {
sh "ctest -V --no-compress-output -T test"
}
}
Expand All @@ -49,7 +50,7 @@ pipeline {
always {
xunit(
tools: [CTest(
pattern: "${BUILD_DIR}/Testing/*/Test.xml",
pattern: "${env.BUILD_DIR}/Testing/*/Test.xml",
failIfNotNew: true,
stopProcessingIfError: true
)],
Expand All @@ -68,7 +69,7 @@ pipeline {
}

steps {
archiveArtifacts(artifacts: "buildOut/dist/*.so", onlyIfSuccessful: true)
archiveArtifacts(artifacts: "${env.BUILD_OUTPUT_DIR}/dist/*.so", onlyIfSuccessful: true)
}
}
}
Expand Down

0 comments on commit 27d6ba1

Please sign in to comment.