build: fail the build on timeout

When there's a timeout we need to handle it in `aborted` post action,
rather than failure.

Change-Id: I861dae2a95ed1818eed937df890f93865da12e75
This commit is contained in:
Egon Elbre 2022-07-07 19:45:13 +03:00
parent d09824d684
commit 5c5e6f75e3
2 changed files with 10 additions and 0 deletions

View File

@ -311,5 +311,10 @@ pipeline {
sh './scripts/gerrit-status.sh pre-merge failure -2'
}
}
aborted {
withCredentials([sshUserPrivateKey(credentialsId: 'gerrit-trigger-ssh', keyFileVariable: 'SSH_KEY', usernameVariable: 'SSH_USER')]) {
sh './scripts/gerrit-status.sh pre-merge failure -2'
}
}
}
}

View File

@ -262,5 +262,10 @@ pipeline {
sh './scripts/gerrit-status.sh verify failure -1'
}
}
aborted {
withCredentials([sshUserPrivateKey(credentialsId: 'gerrit-trigger-ssh', keyFileVariable: 'SSH_KEY', usernameVariable: 'SSH_USER')]) {
sh './scripts/gerrit-status.sh verify failure -1'
}
}
}
}