ci: refs #8698 use always lastCommit from CHANGE_TARGET
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
parent
7d8f25ff7d
commit
5bb078540d
|
@ -39,21 +39,21 @@ def getSpecs() {
|
|||
).trim()
|
||||
def files = []
|
||||
|
||||
while (lastSuccessfulBuild != null && lastSuccessfulBuild.result != 'SUCCESS') {
|
||||
lastSuccessfulBuild = lastSuccessfulBuild.previousBuild
|
||||
}
|
||||
if (lastSuccessfulBuild != null && lastSuccessfulBuild.changeSets.size() > 0) {
|
||||
for (changeSet in lastSuccessfulBuild.changeSets) {
|
||||
for (change in changeSet.items) {
|
||||
lastCommit = change.commitId
|
||||
break
|
||||
}
|
||||
}
|
||||
// while (lastSuccessfulBuild != null && lastSuccessfulBuild.result != 'SUCCESS') {
|
||||
// lastSuccessfulBuild = lastSuccessfulBuild.previousBuild
|
||||
// }
|
||||
// if (lastSuccessfulBuild != null && lastSuccessfulBuild.changeSets.size() > 0) {
|
||||
// for (changeSet in lastSuccessfulBuild.changeSets) {
|
||||
// for (change in changeSet.items) {
|
||||
// lastCommit = change.commitId
|
||||
// break
|
||||
// }
|
||||
// }
|
||||
|
||||
if (lastCommit) {
|
||||
echo "Último commit exitoso: ${lastCommit}"
|
||||
}
|
||||
}
|
||||
// if (lastCommit) {
|
||||
// echo "Último commit exitoso: ${lastCommit}"
|
||||
// }
|
||||
// }
|
||||
|
||||
if(!lastCommit) {
|
||||
lastCommit = sh(script: "git rev-parse origin/${env.CHANGE_TARGET}}", returnStdout: true).trim()
|
||||
|
|
Loading…
Reference in New Issue