From 1ee2922dbcf6f78fa215f09db465aa4b8f5200c0 Mon Sep 17 00:00:00 2001 From: Bo Chen Date: Thu, 26 Jan 2023 17:18:55 -0800 Subject: [PATCH] Jenkinsfile: Enforce global execution timeout This patch adds a global execution timeout to the Jenkinsfile to avoid infinite pending Jenkins pipelines, such as when certain worker nodes are not available. The global execution timeout is now set to 4 hours which is derived from total timeout of our longest stage (e.g. the `Worker build`). Fixes: #5148 Signed-off-by: Bo Chen --- Jenkinsfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index dafc6e72b..5b9a54310 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,6 +1,9 @@ def runWorkers = true pipeline { agent none + options { + timeout(time: 4, unit: 'HOURS') + } stages { stage('Early checks') { agent { node { label 'built-in' } }