]> git.ipfire.org Git - pakfire.git/commitdiff
jenkins: Always archive all test logs for all distros
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 26 Oct 2024 13:09:18 +0000 (13:09 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 26 Oct 2024 13:12:05 +0000 (13:12 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Jenkinsfile

index 0d4c0cc53f0726147e0f2d03d3451dd3e5d90641..10642ab22e86757f26d5694adfdafc786dfa099d 100644 (file)
@@ -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"
                                                        }