diff --git a/Jenkinsfile b/Jenkinsfile index 15523ca6..471e27a7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -42,16 +42,15 @@ pipeline { post { always { + junit 'reports/junit.xml' + archiveArtifacts artifacts: 'reports/**', fingerprint: true cleanWs(cleanWhenNotBuilt: false, notFailBuild: true) } success { echo 'Build completed successfully!' - junit 'reports/junit.xml' - archiveArtifacts artifacts: 'reports/**', fingerprint: true } failure { echo 'Build failed!' - junit 'reports/junit.xml' // Ensures test results are captured even on failure } } -} \ No newline at end of file +}