From 7ac681aa86e1120ec3875b4d01804bcb7b2fb6bd Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sat, 26 Oct 2024 13:09:18 +0000 Subject: [PATCH] jenkins: Always archive all test logs for all distros Signed-off-by: Michael Tremer --- Jenkinsfile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0d4c0cc53..10642ab22 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -220,11 +220,15 @@ pipeline { } post { - failure { + always { + // Copy test logs into a special directory + sh """ + mkdir -pv tests/${DISTRO}/${COMPILER} + cp -v tests/*/*.log tests/${DISTRO}/${COMPILER}/ + """ + // Archive the logs only if the stage fails - archiveArtifacts artifacts: "tests/*/*.log", - fingerprint: true, - allowEmptyArchive: true + archiveArtifacts artifacts: "tests/${DISTRO}/${COMPILER}/*/*.log" echo "The test logs have been archived" } -- 2.39.5