From 95f9917dc289968a097468f1d7014332fee178d4 Mon Sep 17 00:00:00 2001 From: alexm Date: Fri, 28 Feb 2025 14:59:54 +0100 Subject: [PATCH] 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}"