diff --git a/Jenkinsfile b/Jenkinsfile index 5d518bc71..b46974047 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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")