diff --git a/Dockerfile b/Dockerfile index 483d7f1d..00134cf5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,6 @@ WORKDIR $BUILD/$APPNAME RUN chown build . USER build ARG BUILD_DOC=0 -RUN cmake $SRC/$APPNAME -DTRIQS_ROOT=${INSTALL} -DBuild_Documentation=${BUILD_DOC} && make -j2 && make test CTEST_OUTPUT_ON_FAILURE=1 +RUN cmake $SRC/$APPNAME -DTRIQS_ROOT=${INSTALL} -DBuild_Documentation=${BUILD_DOC} && make -j2 USER root RUN make install diff --git a/Jenkinsfile b/Jenkinsfile index 0c37d45e..6e7fffbf 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -39,6 +39,11 @@ for (int i = 0; i < dockerPlatforms.size(); i++) { """ /* build and tag */ def img = docker.build("flatironinstitute/${dockerName}:${env.BRANCH_NAME}-${env.STAGE_NAME}", "--build-arg APPNAME=${projectName} --build-arg BUILD_DOC=${platform==documentationPlatform} .") + catchError(buildResult: 'UNSTABLE', stageResult: 'UNSTABLE') { + img.inside() { + sh "make -C \$BUILD/${projectName} test CTEST_OUTPUT_ON_FAILURE=1" + } + } if (!keepInstall) { sh "docker rmi --no-prune ${img.imageName()}" } @@ -76,12 +81,12 @@ for (int i = 0; i < osxPlatforms.size(); i++) { sh "pip3 install -r $srcDir/requirements.txt" sh "cmake $srcDir -DCMAKE_INSTALL_PREFIX=$installDir -DTRIQS_ROOT=$triqsDir" sh "make -j2" - try { + catchError(buildResult: 'UNSTABLE', stageResult: 'UNSTABLE') { try { sh "make test CTEST_OUTPUT_ON_FAILURE=1" } catch (exc) { archiveArtifacts(artifacts: 'Testing/Temporary/LastTest.log') throw exc - } + } } sh "make install" } } } }