ci: add timeouts to Jenkins pipelines

We've seen a few jobs running on MacOS hosts stuck for days:

* https://ci.status.im/job/nim-waku/job/prs/job/macos/job/PR-982/
* https://ci.status.im/job/nim-waku/job/prs/job/macos/job/PR-979/

Which is not acceptable.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2022-06-08 13:48:30 +02:00 committed by Jakub
parent 0847eec6e0
commit 89868bc7cd
2 changed files with 5 additions and 1 deletions

View File

@ -28,7 +28,9 @@ pipeline {
options {
timestamps()
/* manage how many builds we keep */
/* Prevent Jenkins jobs from running forever */
timeout(time: 30, unit: 'MINUTES')
/* Limit builds retained. */
buildDiscarder(logRotator(
numToKeepStr: '3',
daysToKeepStr: '30',

View File

@ -3,6 +3,8 @@ pipeline {
options {
timestamps()
/* Prevent Jenkins jobs from running forever */
timeout(time: 20, unit: 'MINUTES')
/* manage how many builds we keep */
buildDiscarder(logRotator(
numToKeepStr: '10',