ci: refs #8698 try lastSuccessfulBuild
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
parent
ee96142f2d
commit
04543c8397
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue