From 9274ce903c52496afda00184781cf25f916c1c99 Mon Sep 17 00:00:00 2001 From: alexm Date: Mon, 10 Feb 2025 15:17:32 +0100 Subject: [PATCH] fix: refs #6695 try parallel --- Jenkinsfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index efaf5e4f5..f8512cc2e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -209,13 +209,14 @@ def runTestsInParallel() { 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" - // NO ACABA DE FUNCIONAR + + // Encapsulamos el valor de CYPRESS_SPEC para cada tarea tasks["e2e_${folderName}"] = { script { + def cypressSpec = "test/cypress/integration/${folderName}/**/*.spec.js" // Variable local sh "docker-compose -p ${env.NETWORK}_${folderName} -f docker-compose.e2e.yml up -d back" sh "docker-compose -p ${env.NETWORK}_${folderName} -f docker-compose.e2e.yml up -d front" - sh "CYPRESS_SPEC=test/cypress/integration/${folderName}/**/*.spec.js docker-compose -p ${env.NETWORK}_${folderName} -f docker-compose.e2e.yml up e2e" + sh "CYPRESS_SPEC=${cypressSpec} docker-compose -p ${env.NETWORK}_${folderName} -f docker-compose.e2e.yml up e2e" } } }