From d755c0c8bab1c9ae0d85a355eeb31a00b77d0e3a Mon Sep 17 00:00:00 2001 From: alexm Date: Fri, 28 Feb 2025 14:41:27 +0100 Subject: [PATCH 01/49] refactor: refs #8698 update Jenkinsfile to find last successful build and remove commented test stages --- Jenkinsfile | 125 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 78 insertions(+), 47 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index a52a9e91d..cce5c1e63 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -82,58 +82,89 @@ pipeline { sh 'pnpm install --prefer-offline' } } - stage('Test') { - when { - expression { !IS_PROTECTED_BRANCH } - } - environment { - NODE_ENV = '' - CI = 'true' - TZ = 'Europe/Madrid' - } - parallel { - stage('Unit') { - steps { - sh 'pnpm run test:unit:ci' + stage('Buscar último build con éxito') { + steps { + script { + def lastSuccessfulBuild = currentBuild.previousBuild + + while (lastSuccessfulBuild != null && lastSuccessfulBuild.result != 'SUCCESS') { + lastSuccessfulBuild = lastSuccessfulBuild.previousBuild } - post { - always { - junit( - testResults: 'junit/vitest.xml', - allowEmptyResults: true - ) - } - } - } - stage('E2E') { - environment { - CREDENTIALS = credentials('docker-registry') - COMPOSE_PROJECT = "${PROJECT_NAME}-${env.BUILD_ID}" - COMPOSE_PARAMS = "-p ${env.COMPOSE_PROJECT} -f test/cypress/docker-compose.yml --project-directory ." - } - steps { - script { - sh 'rm junit/e2e-*.xml || true' - env.COMPOSE_TAG = PROTECTED_BRANCH.contains(env.CHANGE_TARGET) ? env.CHANGE_TARGET : 'dev' - def image = docker.build('lilium-dev', '-f docs/Dockerfile.dev docs') - sh "docker-compose ${env.COMPOSE_PARAMS} up -d" - image.inside("--network ${env.COMPOSE_PROJECT}_default -e CI -e TZ") { - sh 'cypress run --browser chromium || true' - } - } - } - post { - always { - sh "docker-compose ${env.COMPOSE_PARAMS} down -v" - junit( - testResults: 'junit/e2e-*.xml', - allowEmptyResults: true - ) - } + + if (lastSuccessfulBuild != null) { + echo "Último build exitoso encontrado: #${lastSuccessfulBuild.number}" + def lastChangeSets = lastSuccessfulBuild.changesets + + // if (lastChangeSets.size() > 0) { + // echo "Cambios en el último build exitoso:" + // for (changeSet in lastChangeSets) { + // for (change in changeSet.items) { + // echo "Autor: ${change.author}" + // echo "Comentario: ${change.comment}" + // echo "Archivos modificados: ${change.affectedPaths}" + // } + // } + // } else { + // echo "El último build exitoso no tiene cambios registrados." + // } + } else { + echo "No se encontró ningún build exitoso previo." } } } } + // stage('Test') { + // when { + // expression { !IS_PROTECTED_BRANCH } + // } + // environment { + // NODE_ENV = '' + // CI = 'true' + // TZ = 'Europe/Madrid' + // } + // parallel { + // stage('Unit') { + // steps { + // sh 'pnpm run test:unit:ci' + // } + // post { + // always { + // junit( + // testResults: 'junit/vitest.xml', + // allowEmptyResults: true + // ) + // } + // } + // } + // stage('E2E') { + // environment { + // CREDENTIALS = credentials('docker-registry') + // COMPOSE_PROJECT = "${PROJECT_NAME}-${env.BUILD_ID}" + // COMPOSE_PARAMS = "-p ${env.COMPOSE_PROJECT} -f test/cypress/docker-compose.yml --project-directory ." + // } + // steps { + // script { + // sh 'rm junit/e2e-*.xml || true' + // env.COMPOSE_TAG = PROTECTED_BRANCH.contains(env.CHANGE_TARGET) ? env.CHANGE_TARGET : 'dev' + // def image = docker.build('lilium-dev', '-f docs/Dockerfile.dev docs') + // sh "docker-compose ${env.COMPOSE_PARAMS} up -d" + // image.inside("--network ${env.COMPOSE_PROJECT}_default -e CI -e TZ") { + // sh 'cypress run --browser chromium || true' + // } + // } + // } + // post { + // always { + // sh "docker-compose ${env.COMPOSE_PARAMS} down -v" + // junit( + // testResults: 'junit/e2e-*.xml', + // allowEmptyResults: true + // ) + // } + // } + // } + // } + // } stage('Build') { when { expression { IS_PROTECTED_BRANCH } -- 2.40.1 From 69f84e2fcd1beb8409f47471c6a571ce465b2a06 Mon Sep 17 00:00:00 2001 From: alexm Date: Fri, 28 Feb 2025 14:53:54 +0100 Subject: [PATCH 02/49] refactor: refs #8698 update Jenkinsfile to extract last successful build commit hash and improve logging --- Jenkinsfile | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index cce5c1e63..a70135c15 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -86,29 +86,25 @@ pipeline { steps { script { def lastSuccessfulBuild = currentBuild.previousBuild - while (lastSuccessfulBuild != null && lastSuccessfulBuild.result != 'SUCCESS') { lastSuccessfulBuild = lastSuccessfulBuild.previousBuild } - if (lastSuccessfulBuild != null) { - echo "Último build exitoso encontrado: #${lastSuccessfulBuild.number}" - def lastChangeSets = lastSuccessfulBuild.changesets + if (lastSuccessfulBuild) { + // Extraer el commit del build exitoso desde el changelog + def lastCommitHash = "" + lastSuccessfulBuild.changesets.each { changeSet -> + changeSet.items.each { change -> + lastCommitHash = change.commitId + } + } - // if (lastChangeSets.size() > 0) { - // echo "Cambios en el último build exitoso:" - // for (changeSet in lastChangeSets) { - // for (change in changeSet.items) { - // echo "Autor: ${change.author}" - // echo "Comentario: ${change.comment}" - // echo "Archivos modificados: ${change.affectedPaths}" - // } - // } - // } else { - // echo "El último build exitoso no tiene cambios registrados." - // } + if (lastCommitHash) { + echo "Último commit exitoso: ${lastCommitHash}" + } } else { - echo "No se encontró ningún build exitoso previo." + lastCommitHash = sh(script: "git rev-parse origin/${env.CHANGE_TARGET}}", returnStdout: true).trim() + echo "Hash obtenido con git: ${lastCommitHash}" } } } -- 2.40.1 From bfe302e9d4de186409ebffb7ea2e35b4c39e8549 Mon Sep 17 00:00:00 2001 From: alexm Date: Fri, 28 Feb 2025 14:55:35 +0100 Subject: [PATCH 03/49] refactor: refs #8698 update Jenkinsfile to extract last successful build commit hash and improve logging --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index a70135c15..d8f472915 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -90,7 +90,7 @@ pipeline { lastSuccessfulBuild = lastSuccessfulBuild.previousBuild } - if (lastSuccessfulBuild) { + if (lastSuccessfulBuild != null) { // Extraer el commit del build exitoso desde el changelog def lastCommitHash = "" lastSuccessfulBuild.changesets.each { changeSet -> -- 2.40.1 From f17b773cca8babbd7220b3142461c49ab56d3f0d Mon Sep 17 00:00:00 2001 From: alexm Date: Fri, 28 Feb 2025 14:57:33 +0100 Subject: [PATCH 04/49] refactor: refs #8698 update Jenkinsfile to extract last successful build commit hash and improve logging --- Jenkinsfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index d8f472915..36829f575 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -93,9 +93,12 @@ pipeline { if (lastSuccessfulBuild != null) { // Extraer el commit del build exitoso desde el changelog def lastCommitHash = "" - lastSuccessfulBuild.changesets.each { changeSet -> - changeSet.items.each { change -> - lastCommitHash = change.commitId + for (changeSet in currentBuild.changesets) { + for (change in changeSet.items) { + echo "Autor: ${change.author}" + echo "Comentario: ${change.comment}" + echo "Archivos modificados: ${change.affectedPaths}" + echo "Commit: ${change.commitId}" } } -- 2.40.1 From 28ae84a9314b9c8fa4c27ca15158250edd0cfbdf Mon Sep 17 00:00:00 2001 From: alexm Date: Fri, 28 Feb 2025 14:58:37 +0100 Subject: [PATCH 05/49] refactor: refs #8698 update Jenkinsfile to use last successful build's changesets for commit extraction --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 36829f575..e4ef31e3f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -93,7 +93,7 @@ pipeline { if (lastSuccessfulBuild != null) { // Extraer el commit del build exitoso desde el changelog def lastCommitHash = "" - for (changeSet in currentBuild.changesets) { + for (changeSet in lastSuccessfulBuild.changesets) { for (change in changeSet.items) { echo "Autor: ${change.author}" echo "Comentario: ${change.comment}" -- 2.40.1 From 95f9917dc289968a097468f1d7014332fee178d4 Mon Sep 17 00:00:00 2001 From: alexm Date: Fri, 28 Feb 2025 14:59:54 +0100 Subject: [PATCH 06/49] refactor: refs #8698 update Jenkinsfile to log last successful build details and clean up commented code --- Jenkinsfile | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index e4ef31e3f..1874102cc 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -91,20 +91,21 @@ pipeline { } if (lastSuccessfulBuild != null) { + echo "lastSuccessfulBuild ${lastSuccessfulBuild}" // Extraer el commit del build exitoso desde el changelog def lastCommitHash = "" - for (changeSet in lastSuccessfulBuild.changesets) { - for (change in changeSet.items) { - echo "Autor: ${change.author}" - echo "Comentario: ${change.comment}" - echo "Archivos modificados: ${change.affectedPaths}" - echo "Commit: ${change.commitId}" - } - } + // for (changeSet in lastSuccessfulBuild.changesets) { + // for (change in changeSet.items) { + // echo "Autor: ${change.author}" + // echo "Comentario: ${change.comment}" + // echo "Archivos modificados: ${change.affectedPaths}" + // echo "Commit: ${change.commitId}" + // } + // } - if (lastCommitHash) { - echo "Último commit exitoso: ${lastCommitHash}" - } + // if (lastCommitHash) { + // echo "Último commit exitoso: ${lastCommitHash}" + // } } else { lastCommitHash = sh(script: "git rev-parse origin/${env.CHANGE_TARGET}}", returnStdout: true).trim() echo "Hash obtenido con git: ${lastCommitHash}" -- 2.40.1 From a250cc0eb586244e1fa8cab09ce4fced0a70867b Mon Sep 17 00:00:00 2001 From: alexm Date: Fri, 28 Feb 2025 15:01:45 +0100 Subject: [PATCH 07/49] ci: refs #8698 extract lastSuccessfulBuild --- Jenkinsfile | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 1874102cc..8beb056d7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -90,22 +90,22 @@ pipeline { lastSuccessfulBuild = lastSuccessfulBuild.previousBuild } - if (lastSuccessfulBuild != null) { + if (lastSuccessfulBuild != null && lastSuccessfulBuild.changesets.size() > 0) { echo "lastSuccessfulBuild ${lastSuccessfulBuild}" // Extraer el commit del build exitoso desde el changelog def lastCommitHash = "" - // for (changeSet in lastSuccessfulBuild.changesets) { - // for (change in changeSet.items) { - // echo "Autor: ${change.author}" - // echo "Comentario: ${change.comment}" - // echo "Archivos modificados: ${change.affectedPaths}" - // echo "Commit: ${change.commitId}" - // } - // } + for (changeSet in lastSuccessfulBuild.changesets) { + for (change in changeSet.items) { + echo "Autor: ${change.author}" + echo "Comentario: ${change.comment}" + echo "Archivos modificados: ${change.affectedPaths}" + echo "Commit: ${change.commitId}" + } + } - // if (lastCommitHash) { - // echo "Último commit exitoso: ${lastCommitHash}" - // } + if (lastCommitHash) { + echo "Último commit exitoso: ${lastCommitHash}" + } } else { lastCommitHash = sh(script: "git rev-parse origin/${env.CHANGE_TARGET}}", returnStdout: true).trim() echo "Hash obtenido con git: ${lastCommitHash}" -- 2.40.1 From 4ee7a5c4fbc3abbc69e2f0f54819bb522015800b Mon Sep 17 00:00:00 2001 From: alexm Date: Mon, 3 Mar 2025 08:49:05 +0100 Subject: [PATCH 08/49] ci: refs #8698 try lastSuccessfulBuild --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8beb056d7..02d350ac7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -91,7 +91,7 @@ pipeline { } if (lastSuccessfulBuild != null && lastSuccessfulBuild.changesets.size() > 0) { - echo "lastSuccessfulBuild ${lastSuccessfulBuild}" + echo "lastSuccessfulBuild ${lastSuccessfulBuild} ${lastSuccessfulBuild.changesets.size()}" // Extraer el commit del build exitoso desde el changelog def lastCommitHash = "" for (changeSet in lastSuccessfulBuild.changesets) { -- 2.40.1 From c7d26084aa3b56e374e73833fa38b0f41200706b Mon Sep 17 00:00:00 2001 From: alexm Date: Mon, 3 Mar 2025 08:59:06 +0100 Subject: [PATCH 09/49] fix: refs #8698 comment out commit ID echo in Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 02d350ac7..7d3acd305 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -99,7 +99,7 @@ pipeline { echo "Autor: ${change.author}" echo "Comentario: ${change.comment}" echo "Archivos modificados: ${change.affectedPaths}" - echo "Commit: ${change.commitId}" + // echo "Commit: ${change.commitId}" } } -- 2.40.1 From efaa8a517b08446d0b5335f82dfd39689a5f3e01 Mon Sep 17 00:00:00 2001 From: alexm Date: Mon, 3 Mar 2025 09:32:03 +0100 Subject: [PATCH 10/49] feat: refs #8698 add Cypress tests for login, logout, password recovery, and two-factor authentication --- Jenkinsfile | 32 ++++++++++--------- .../{outLogin => login}/login.spec.js | 0 .../{outLogin => login}/logout.spec.js | 0 .../recoverPassword.spec.js | 0 .../{outLogin => login}/twoFactor.spec.js | 0 5 files changed, 17 insertions(+), 15 deletions(-) rename test/cypress/integration/{outLogin => login}/login.spec.js (100%) rename test/cypress/integration/{outLogin => login}/logout.spec.js (100%) rename test/cypress/integration/{outLogin => login}/recoverPassword.spec.js (100%) rename test/cypress/integration/{outLogin => login}/twoFactor.spec.js (100%) diff --git a/Jenkinsfile b/Jenkinsfile index 7d3acd305..a2041b1ea 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -90,24 +90,26 @@ pipeline { lastSuccessfulBuild = lastSuccessfulBuild.previousBuild } - if (lastSuccessfulBuild != null && lastSuccessfulBuild.changesets.size() > 0) { - echo "lastSuccessfulBuild ${lastSuccessfulBuild} ${lastSuccessfulBuild.changesets.size()}" - // Extraer el commit del build exitoso desde el changelog - def lastCommitHash = "" - for (changeSet in lastSuccessfulBuild.changesets) { - for (change in changeSet.items) { - echo "Autor: ${change.author}" - echo "Comentario: ${change.comment}" - echo "Archivos modificados: ${change.affectedPaths}" - // echo "Commit: ${change.commitId}" + def lastCommitHash = "" + + if (lastSuccessfulBuild) { + def rawBuild = lastSuccessfulBuild.getRawBuild() // Convertimos a hudson.model.Run + + if (rawBuild.changeSets?.size() > 0) { + echo "lastSuccessfulBuild: #${lastSuccessfulBuild.number}, Changesets: ${rawBuild.changeSets.size()}" + + for (changeSet in rawBuild.changeSets) { + for (change in changeSet.items) { + echo "Archivos modificados: ${change.affectedPaths}" + echo "Commit: ${change.commitId}" + lastCommitHash = change.commitId // Tomamos el commit más reciente + } } } + } - if (lastCommitHash) { - echo "Último commit exitoso: ${lastCommitHash}" - } - } else { - lastCommitHash = sh(script: "git rev-parse origin/${env.CHANGE_TARGET}}", returnStdout: true).trim() + if (!lastCommitHash) { + lastCommitHash = sh(script: "git rev-parse origin/${env.CHANGE_TARGET}", returnStdout: true).trim() echo "Hash obtenido con git: ${lastCommitHash}" } } diff --git a/test/cypress/integration/outLogin/login.spec.js b/test/cypress/integration/login/login.spec.js similarity index 100% rename from test/cypress/integration/outLogin/login.spec.js rename to test/cypress/integration/login/login.spec.js diff --git a/test/cypress/integration/outLogin/logout.spec.js b/test/cypress/integration/login/logout.spec.js similarity index 100% rename from test/cypress/integration/outLogin/logout.spec.js rename to test/cypress/integration/login/logout.spec.js diff --git a/test/cypress/integration/outLogin/recoverPassword.spec.js b/test/cypress/integration/login/recoverPassword.spec.js similarity index 100% rename from test/cypress/integration/outLogin/recoverPassword.spec.js rename to test/cypress/integration/login/recoverPassword.spec.js diff --git a/test/cypress/integration/outLogin/twoFactor.spec.js b/test/cypress/integration/login/twoFactor.spec.js similarity index 100% rename from test/cypress/integration/outLogin/twoFactor.spec.js rename to test/cypress/integration/login/twoFactor.spec.js -- 2.40.1 From d2be59ddbf0816158e5414ef5dfe13016c7ed3df Mon Sep 17 00:00:00 2001 From: alexm Date: Mon, 3 Mar 2025 09:45:25 +0100 Subject: [PATCH 11/49] fix: refs #8698 comment out unnecessary echo statements and clean up lastSuccessfulBuild logic in Jenkinsfile --- Jenkinsfile | 42 ++++++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index a2041b1ea..e1ba79ae5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -89,31 +89,29 @@ pipeline { while (lastSuccessfulBuild != null && lastSuccessfulBuild.result != 'SUCCESS') { lastSuccessfulBuild = lastSuccessfulBuild.previousBuild } + echo "lastSuccessfulBuild ${lastSuccessfulBuild}" + // if (lastSuccessfulBuild != null && lastSuccessfulBuild.changesets.size() > 0) { + // echo "lastSuccessfulBuild ${lastSuccessfulBuild} ${lastSuccessfulBuild.changesets.size()}" + // // Extraer el commit del build exitoso desde el changelog + // def lastCommitHash = "" + // for (changeSet in lastSuccessfulBuild.changesets) { + // for (change in changeSet.items) { + // echo "Archivos modificados: ${change.affectedPaths}" + // echo "Commit: ${change.commitId}" + // } + // } - def lastCommitHash = "" - - if (lastSuccessfulBuild) { - def rawBuild = lastSuccessfulBuild.getRawBuild() // Convertimos a hudson.model.Run - - if (rawBuild.changeSets?.size() > 0) { - echo "lastSuccessfulBuild: #${lastSuccessfulBuild.number}, Changesets: ${rawBuild.changeSets.size()}" - - for (changeSet in rawBuild.changeSets) { - for (change in changeSet.items) { - echo "Archivos modificados: ${change.affectedPaths}" - echo "Commit: ${change.commitId}" - lastCommitHash = change.commitId // Tomamos el commit más reciente - } - } - } - } - - if (!lastCommitHash) { - lastCommitHash = sh(script: "git rev-parse origin/${env.CHANGE_TARGET}", returnStdout: true).trim() - echo "Hash obtenido con git: ${lastCommitHash}" - } + // if (lastCommitHash) { + // echo "Último commit exitoso: ${lastCommitHash}" + // } + // } else { + // lastCommitHash = sh(script: "git rev-parse origin/${env.CHANGE_TARGET}}", returnStdout: true).trim() + // echo "Hash obtenido con git: ${lastCommitHash}" + // } } } + + } // stage('Test') { // when { -- 2.40.1 From 1a52a23712a9bcf2c570e9f7b8d988bc1f8b0590 Mon Sep 17 00:00:00 2001 From: alexm Date: Mon, 3 Mar 2025 09:56:52 +0100 Subject: [PATCH 12/49] fix: refs #8698 update Jenkinsfile to include last successful build test information --- Jenkinsfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index e1ba79ae5..9c56d2527 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -86,10 +86,11 @@ pipeline { steps { script { def lastSuccessfulBuild = currentBuild.previousBuild + def lastSuccessfulBuildTest = currentBuild.lastSuccessfulBuild while (lastSuccessfulBuild != null && lastSuccessfulBuild.result != 'SUCCESS') { lastSuccessfulBuild = lastSuccessfulBuild.previousBuild } - echo "lastSuccessfulBuild ${lastSuccessfulBuild}" + echo "lastSuccessfulBuild ${lastSuccessfulBuild} test ${lastSuccessfulBuildTest}" // if (lastSuccessfulBuild != null && lastSuccessfulBuild.changesets.size() > 0) { // echo "lastSuccessfulBuild ${lastSuccessfulBuild} ${lastSuccessfulBuild.changesets.size()}" // // Extraer el commit del build exitoso desde el changelog -- 2.40.1 From 6ab64453abc92395e56eb92d5c3f1b15cffc8b1b Mon Sep 17 00:00:00 2001 From: alexm Date: Mon, 3 Mar 2025 11:13:15 +0100 Subject: [PATCH 13/49] ci: refs #8698 try lastSuccessfulBuild --- Jenkinsfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 9c56d2527..e1ba79ae5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -86,11 +86,10 @@ pipeline { steps { script { def lastSuccessfulBuild = currentBuild.previousBuild - def lastSuccessfulBuildTest = currentBuild.lastSuccessfulBuild while (lastSuccessfulBuild != null && lastSuccessfulBuild.result != 'SUCCESS') { lastSuccessfulBuild = lastSuccessfulBuild.previousBuild } - echo "lastSuccessfulBuild ${lastSuccessfulBuild} test ${lastSuccessfulBuildTest}" + echo "lastSuccessfulBuild ${lastSuccessfulBuild}" // if (lastSuccessfulBuild != null && lastSuccessfulBuild.changesets.size() > 0) { // echo "lastSuccessfulBuild ${lastSuccessfulBuild} ${lastSuccessfulBuild.changesets.size()}" // // Extraer el commit del build exitoso desde el changelog -- 2.40.1 From e24600d1adefc14a779c4139028c1fd55541ad65 Mon Sep 17 00:00:00 2001 From: alexm Date: Mon, 3 Mar 2025 11:18:19 +0100 Subject: [PATCH 14/49] ci: refs #8698 try lastSuccessfulBuild --- Jenkinsfile | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index e1ba79ae5..1111e0b55 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -74,14 +74,14 @@ pipeline { } } } - stage('Install') { - environment { - NODE_ENV = "" - } - steps { - sh 'pnpm install --prefer-offline' - } - } + // stage('Install') { + // environment { + // NODE_ENV = "" + // } + // steps { + // sh 'pnpm install --prefer-offline' + // } + // } stage('Buscar último build con éxito') { steps { script { @@ -89,7 +89,7 @@ pipeline { while (lastSuccessfulBuild != null && lastSuccessfulBuild.result != 'SUCCESS') { lastSuccessfulBuild = lastSuccessfulBuild.previousBuild } - echo "lastSuccessfulBuild ${lastSuccessfulBuild}" + echo "lastSuccessfulBuild ${lastSuccessfulBuild.changesets}" // if (lastSuccessfulBuild != null && lastSuccessfulBuild.changesets.size() > 0) { // echo "lastSuccessfulBuild ${lastSuccessfulBuild} ${lastSuccessfulBuild.changesets.size()}" // // Extraer el commit del build exitoso desde el changelog -- 2.40.1 From d302ee58c020addaf4474b6577f7f59d15fe4eff Mon Sep 17 00:00:00 2001 From: alexm Date: Mon, 3 Mar 2025 11:31:01 +0100 Subject: [PATCH 15/49] ci: refs #8698 try lastSuccessfulBuild --- Jenkinsfile | 8 ++++++++ src/pages/Login/LoginMain.vue | 1 + 2 files changed, 9 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 1111e0b55..8a03caf50 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -82,6 +82,14 @@ pipeline { // sh 'pnpm install --prefer-offline' // } // } + stage('Echo?') { + when { + changeset "src/pages/**/*" + } + steps { + echo "hola" + } + } stage('Buscar último build con éxito') { steps { script { diff --git a/src/pages/Login/LoginMain.vue b/src/pages/Login/LoginMain.vue index a4c3566a9..76b84bab7 100644 --- a/src/pages/Login/LoginMain.vue +++ b/src/pages/Login/LoginMain.vue @@ -51,6 +51,7 @@ async function onSubmit() { }); } } +// REMOVE: