Skip to content

Commit

Permalink
build: fail the build on timeout
Browse files Browse the repository at this point in the history
When there's a timeout we need to handle it in `aborted` post action,
rather than failure.

Change-Id: I861dae2a95ed1818eed937df890f93865da12e75
  • Loading branch information
egonelbre authored and andriikotko committed Jul 13, 2022
1 parent 4e31c96 commit fb55727
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Jenkinsfile.premerge
Expand Up @@ -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'
}
}
}
}
5 changes: 5 additions & 0 deletions Jenkinsfile.verify
Expand Up @@ -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'
}
}
}
}

0 comments on commit fb55727

Please sign in to comment.