Archive artifacts individually in each stage

pull/661/head
cruizba 2021-10-22 13:38:31 +02:00
parent 9a7f54e8cd
commit f60bad0467
1 changed files with 18 additions and 4 deletions

View File

@ -140,7 +140,15 @@ node('container') {
} }
try { try {
stage ('OpenVidu Kurento E2E tests') { stage ('OpenVidu Kurento E2E tests') {
openViduE2ETest('kurento') try {
openViduE2ETest('kurento')
} catch (err) {
// In case of error, fail the stage
sh 'exit 1'
} finally {
junit 'openvidu/openvidu-test-e2e/**/target/surefire-reports/TEST-*.xml'
archiveArtifacts artifacts: '**/openvidu-server-*.log'
}
} }
} catch (error) { } catch (error) {
echo 'Test failed' echo 'Test failed'
@ -148,8 +156,6 @@ node('container') {
} finally { } finally {
// Kill all environment for next test // Kill all environment for next test
environmentStop() environmentStop()
junit 'openvidu/openvidu-test-e2e/**/target/surefire-reports/TEST-*.xml'
archiveArtifacts artifacts: '**/openvidu-server-*.log'
} }
// ---- // ----
@ -160,7 +166,15 @@ node('container') {
} }
try { try {
stage ('OpenVidu Mediasoup E2E tests') { stage ('OpenVidu Mediasoup E2E tests') {
openViduE2ETest('mediasoup') try {
openViduE2ETest('mediasoup')
} catch (err) {
// In case of error, fail the stage
sh 'exit 1'
} finally {
junit 'openvidu/openvidu-test-e2e/**/target/surefire-reports/TEST-*.xml'
archiveArtifacts artifacts: '**/openvidu-server-*.log'
}
} }
} catch (error) { } catch (error) {
echo 'Test failed' echo 'Test failed'