Skip to content

Commit

Permalink
pipeline: add overall timeout of 4h
Browse files Browse the repository at this point in the history
Let's cap build runs to 4h. Builds should never take that long. Ideally,
we'd do timeouts per stage, and that could make sense (e.g. signing for
example could in the worst case take more than 1h, but building the
qcow2 shouldn't really take more than 15m), though just having one
overall timeout to start with will at least prevent jobs from getting
stuck anywhere in the process forever and taking up a pod in a cluster.

Closes: #195
  • Loading branch information
jlebon authored and dustymabe committed Mar 28, 2020
1 parent 5fec344 commit 093801e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ lock(resource: "build-${params.STREAM}") {
// declare this early so we can use it in Slack
def newBuildID

try {
try { timeout(time: 240, unit: 'MINUTES') {

// Clone the automation repo, which contains helper scripts. In the
// future, we'll probably want this either part of the cosa image, or
Expand Down Expand Up @@ -515,8 +515,8 @@ lock(resource: "build-${params.STREAM}") {

currentBuild.result = 'SUCCESS'

// main try {} finishes here
} catch (e) {
// main timeout and try {} finish here
}} catch (e) {
currentBuild.result = 'FAILURE'
throw e
} finally {
Expand Down

0 comments on commit 093801e

Please sign in to comment.