fix: refs #6695 try parallel
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details

This commit is contained in:
Alex Moreno 2025-02-10 13:43:16 +01:00
parent aae343fb25
commit 81ad9402ee
1 changed files with 7 additions and 6 deletions

13
Jenkinsfile vendored
View File

@ -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
}