Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
}
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"
}