fix: refs #6695 update E2E stages to run tests in parallel for specific folders
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
parent
7cd6716308
commit
68210f817d
|
@ -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<String> 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
|
||||
|
|
Loading…
Reference in New Issue