Skip to content

Commit 13e9bc2

Browse files
committed
Add timeout for build/test steps to avoid holding up workers
1 parent 646fe26 commit 13e9bc2

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Jenkinsfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ pipeline {
2121

2222
stages {
2323
stage('Docker CPU Build') {
24+
options {
25+
timeout(time: 90, unit: 'MINUTES')
26+
}
2427
steps {
2528
sh '''#!/bin/bash
2629
set -exo pipefail
@@ -32,6 +35,9 @@ pipeline {
3235
}
3336

3437
stage('Test CPU Image') {
38+
options {
39+
timeout(time: 5, unit: 'MINUTES')
40+
}
3541
steps {
3642
sh '''#!/bin/bash
3743
set -exo pipefail
@@ -62,6 +68,9 @@ pipeline {
6268
// TODO(rosbo) don't set `nvidia` as the default runtime and use the
6369
// `--runtime=nvidia` flag for the `docker run` command when GPU support is needed.
6470
agent { label 'ephemeral-linux-gpu' }
71+
options {
72+
timeout(time: 45, unit: 'MINUTES')
73+
}
6574
steps {
6675
sh '''#!/bin/bash
6776
set -exo pipefail
@@ -80,6 +89,9 @@ pipeline {
8089

8190
stage('Test GPU Image') {
8291
agent { label 'ephemeral-linux-gpu' }
92+
options {
93+
timeout(time: 20, unit: 'MINUTES')
94+
}
8395
steps {
8496
sh '''#!/bin/bash
8597
set -exo pipefail

0 commit comments

Comments
 (0)