From 81ad9402ee2503d622170ed3bcbfc8f150f03a45 Mon Sep 17 00:00:00 2001 From: alexm Date: Mon, 10 Feb 2025 13:43:16 +0100 Subject: [PATCH] fix: refs #6695 try parallel --- Jenkinsfile | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6135f4815..cb5bd995b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -185,22 +185,23 @@ def cleanDockerE2E() { def runTestsInParallel() { // def integrationTests = sh(script: "ls -d test/cypress/integration/*/ || echo ''", returnStdout: true).trim().split('\n') def integrationTests = ['test/cypress/integration/claim/', 'test/cypress/integration/client/'] - def tasks = [:] integrationTests.each { testFolder -> - if (testFolder.trim()) { // Evita procesar líneas vacías + if (testFolder.trim()) { def folderName = testFolder.replaceAll('test/cypress/integration/', '').replaceAll('/', '') folderName = folderName.replaceAll('[^a-zA-Z0-9_-]', '') // Seguridad en nombres de red env.CYPRESS_SPEC="test/cypress/integration/${folderName}/**/*.spec.js" + tasks["e2e_${folderName}"] = { - sh "docker-compose -p ${env.NETWORK}_${folderName} -f docker-compose.e2e.yml up -d back vn-database" - sh "docker-compose -p ${env.NETWORK}_${folderName} -f docker-compose.e2e.yml up -d front" - sh "docker-compose -p ${env.NETWORK}_${folderName} -f docker-compose.e2e.yml up e2e" + script { + sh "docker-compose -p ${env.NETWORK}_${folderName} -f docker-compose.e2e.yml up -d back vn-database" + sh "docker-compose -p ${env.NETWORK}_${folderName} -f docker-compose.e2e.yml up -d front" + sh "docker-compose -p ${env.NETWORK}_${folderName} -f docker-compose.e2e.yml up e2e" + } } } } parallel tasks } -