From 89868bc7cd4197a3a4578aa8487dc366edc2f4af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Wed, 8 Jun 2022 13:48:30 +0200 Subject: [PATCH] ci: add timeouts to Jenkins pipelines MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- ci/Jenkinsfile.prs | 4 +++- ci/Jenkinsfile.release | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ci/Jenkinsfile.prs b/ci/Jenkinsfile.prs index 78735fa0b..41fa2dd13 100644 --- a/ci/Jenkinsfile.prs +++ b/ci/Jenkinsfile.prs @@ -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', diff --git a/ci/Jenkinsfile.release b/ci/Jenkinsfile.release index 87fe67d0e..d2dd256b1 100644 --- a/ci/Jenkinsfile.release +++ b/ci/Jenkinsfile.release @@ -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',