test: refs #6695 handle e2e erros

This commit is contained in:
Alex Moreno 2025-02-03 08:58:59 +01:00
parent 040673f500
commit 1ea6af8eb9
1 changed files with 2 additions and 1 deletions

3
Jenkinsfile vendored
View File

@ -134,7 +134,8 @@ pipeline {
def exitCode = sh(script: "docker inspect -f '{{.State.ExitCode}}' ${containerId}", returnStdout: true).trim()
sh "docker cp ${containerId}:/app/test/cypress/reports ./test/cypress/"
if (exitCode != '0') {
error("Cypress E2E tests failed with exit code: ${exitCode}")
def logs = sh(script: "docker logs ${containerId}", returnStdout: true).trim()
error("Cypress E2E tests failed with exit code: ${exitCode}\nLogs:\n${logs}")
}
} else {
error("The Docker container for E2E tests could not be created")