From 0792e9d9f1e488121eadb00cc3ea05e97dccfff2 Mon Sep 17 00:00:00 2001 From: Simon Quigley Date: Fri, 19 Jun 2020 15:29:15 -0500 Subject: [PATCH] Don't treat currently-running builds as non-passing, just get the last completed status. --- modules/jenkins.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/jenkins.py b/modules/jenkins.py index 68d5e87..d800293 100755 --- a/modules/jenkins.py +++ b/modules/jenkins.py @@ -71,7 +71,8 @@ class JenkinsModule: # The goal of this is to identify problematic jobs, and jobs with # no existing builds aren't necessarily problematic (yet) try: - status = val.get_last_build().get_status() + status = val.get_last_build().get_status() or \ + val.get_last_completed_build().get_status() except NoBuildData: status = "SUCCESS"