Skip to content

Commit

Permalink
Jenkinsfile: add timeout to build and test steps
Browse files Browse the repository at this point in the history
This will hopefully make CI runs more robust and recover stale workers.
  • Loading branch information
mweinelt committed Apr 26, 2020
1 parent 5231fb0 commit dd7d37b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions contrib/ci/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ pipeline {
sh label: 'Identify runner', script: 'echo $SLAVE_NAME'
sh 'make update'
sh 'test -d /dl_cache && ln -s /dl_cache openwrt/dl || true'
sh 'make -j$(nproc) V=s'
timeout(time: 2, unit: "HOURS") {
sh 'make -j$(nproc) V=s'
}
stash includes: '**/output/images/factory/*-x86-64.img.gz', name: 'gluon-x86-64-factory'
}
}
Expand All @@ -53,7 +55,9 @@ pipeline {
sh label: 'Print python environment', script: 'python3 -m pip freeze'
script {
for (f in findFiles(glob: 'tests/*.py')) {
sh label: "Test ${f.name}", script: "python3 tests/${f.name} --use-tmp-workdir"
timeout(time: 10, unit: "MINUTES") {
sh label: "Test ${f.name}", script: "python3 tests/${f.name} --use-tmp-workdir"
}
}
}
}
Expand Down

0 comments on commit dd7d37b

Please sign in to comment.