refactor: refs #8698 update Jenkinsfile to extract last successful build commit hash and improve logging
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details

This commit is contained in:
Alex Moreno 2025-02-28 14:57:33 +01:00
parent bfe302e9d4
commit f17b773cca
1 changed files with 6 additions and 3 deletions

9
Jenkinsfile vendored
View File

@ -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}"
}
}