refactor: refs #6695 improve group size calculation for parallel test execution in Jenkinsfile
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details

This commit is contained in:
Alex Moreno 2025-02-13 09:29:09 +01:00
parent 8eb60e1700
commit c72e8d9fed
1 changed files with 3 additions and 1 deletions

4
Jenkinsfile vendored
View File

@ -192,7 +192,8 @@ def runTestsInParallel(int numParallelGroups) {
}
// Divide las carpetas en grupos para paralelizar
def groups = folders.collate(Math.ceil(folders.size() / numParallelGroups) as int)
def groupSize = (folders.size() + numParallelGroups - 1) / numParallelGroups // Redondeo hacia arriba
def groups = folders.collate(groupSize)
def tasks = [:]
groups.eachWithIndex { group, index ->
@ -225,6 +226,7 @@ def runTestsInParallel(int numParallelGroups) {
}
def checkErrors(String folderName){
def containerId = sh(script: "docker-compose -p ${env.NETWORK}_${folderName} -f docker-compose.e2e.yml ps -q e2e", returnStdout: true).trim()
if (containerId) {