diff --git a/Jenkinsfile b/Jenkinsfile
index d69365495..7fde7a199 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -129,10 +129,21 @@ pipeline {
                     steps {
                         script {
                             sh 'docker-compose -f docker-compose.e2e.yml up e2e'
-                            def result = sh(script: 'docker-compose -f docker-compose.e2e.yml ps -q e2e | xargs docker inspect -f "{{.State.ExitCode}}"', returnStatus: true)
-                            sh 'docker cp $(docker-compose -f docker-compose.e2e.yml ps -q e2e):/app/test/cypress/reports ./test/cypress/'
-                            if (result != 0) {
-                                error("Cypress E2E tests failed with exit code: ${result}")
+                            // Obtener el ID del contenedor e2e
+                            def containerId = sh(script: "docker-compose -f docker-compose.e2e.yml ps -q e2e", returnStdout: true).trim()
+                            if (containerId) {
+                                // Obtener el exit code del contenedor
+                                def exitCode = sh(script: "docker inspect -f '{{.State.ExitCode}}' ${containerId}", returnStdout: true).trim()
+
+                                // Copiar reportes desde el contenedor a Jenkins
+                                sh "docker cp ${containerId}:/app/test/cypress/reports ./test/cypress/"
+
+                                // Si hubo errores en Cypress, fallar el build
+                                if (exitCode != '0') {
+                                    error("Cypress E2E tests failed with exit code: ${exitCode}")
+                                }
+                            } else {
+                                error("No se encontrĂ³ el contenedor e2e.")
                             }
                         }
                     }
@@ -140,14 +151,15 @@ pipeline {
             }
             post {
                 always {
-                    publishHTML([
-                        allowMissing: true,
-                        alwaysLinkToLastBuild: true,
-                        keepAll: true,
-                        reportDir: 'test/cypress/reports',
-                        reportFiles: '*.html',
-                        reportName: 'Cypress Mochawesome Report'
-                    ])
+                    // sh 'docker cp $(docker-compose -f docker-compose.e2e.yml ps -q e2e):/app/test/cypress/reports ./test/cypress/' // in run
+                    // publishHTML([
+                    //     allowMissing: true,
+                    //     alwaysLinkToLastBuild: true,
+                    //     keepAll: true,
+                    //     reportDir: 'test/cypress/reports',
+                    //     reportFiles: '*.html',
+                    //     reportName: 'Cypress Mochawesome Report'
+                    // ])
                     cleanDockerE2E()
                 }
             }