From 68210f817d76787421b72c94a9a02fdb929dbf63 Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 11 Feb 2025 15:41:19 +0100 Subject: [PATCH] fix: refs #6695 update E2E stages to run tests in parallel for specific folders --- Jenkinsfile | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 7042b3dbd0..eba0ba41a1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -107,10 +107,25 @@ pipeline { } } - stage('Run E2E') { + stage('E2E: Basic') { steps { script { - runTestsInParallel() + runTestsInParallel([ + 'test/cypress/integration/vnComponent/', + 'test/cypress/integration/outLogin/', + ]) + } + } + } + stage('E2E: Sections') { + steps { + script { + runTestsInParallel([ + 'test/cypress/integration/claim/', + 'test/cypress/integration/client/', + 'test/cypress/integration/entry/', + 'test/cypress/integration/invoiceIn/' + ]) } } @@ -190,12 +205,13 @@ 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/', 'test/cypress/integration/entry/', 'test/cypress/integration/invoiceIn/'] +def runTestsInParallel(List folders) { + if (!folders) { // Si es null o vacĂ­o, asigna valores por defecto + folders =sh(script: "ls -d test/cypress/integration/*/ || echo ''", returnStdout: true).trim().split('\n') + } def tasks = [:] - integrationTests.each { testFolder -> + folders.each { testFolder -> if (testFolder.trim()) { def folderName = testFolder.replaceAll('test/cypress/integration/', '').replaceAll('/', '') folderName = folderName.replaceAll('[^a-zA-Z0-9_-]', '') // Seguridad en nombres de red