ci: refs #8698 try lastSuccessfulBuild
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Alex Moreno 2025-03-03 12:53:13 +01:00
parent ee96142f2d
commit 04543c8397
1 changed files with 20 additions and 18 deletions

38
Jenkinsfile vendored
View File

@ -9,6 +9,26 @@ def BRANCH_ENV = [
beta: 'production'
]
def searchFiles = { searchString ->
def searchPath = "src/pages"
// Buscar en todos los archivos .vue dentro de src/pages
def matchingFiles = sh(
script: "grep -rl '${searchString}' ${searchPath} || true",
returnStdout: true
).trim().split("\n")
// Filtrar por si la salida está vacía
matchingFiles = matchingFiles.findAll { it.trim() }
// Extraer solo el tercer segmento del path
def extractedFolders = matchingFiles.collect { "test/cypress/integration/" + it.split("/")[2] + "/**/*.spec.js" }.unique()
echo "Carpetas donde se encontró '${searchString}': ${extractedFolders}"
return extractedFolders
}
node {
stage('Setup') {
env.NODE_ENV = BRANCH_ENV[env.BRANCH_NAME] ?: 'dev'
@ -241,21 +261,3 @@ pipeline {
}
}
def searchFiles = { searchString ->
def searchPath = "src/pages"
// Buscar en todos los archivos .vue dentro de src/pages
def matchingFiles = sh(
script: "grep -rl '${searchString}' ${searchPath} || true",
returnStdout: true
).trim().split("\n")
// Filtrar por si la salida está vacía
matchingFiles = matchingFiles.findAll { it.trim() }
// Extraer solo el tercer segmento del path
def extractedFolders = matchingFiles.collect { "test/cypress/integration/" + it.split("/")[2] + "/**/*.spec.js" }.unique()
echo "Carpetas donde se encontró '${searchString}': ${extractedFolders}"
return extractedFolders
}