From f6ae209c17e79de53090545ddc4b677bf0040968 Mon Sep 17 00:00:00 2001 From: Julien Malka Date: Sun, 9 Apr 2023 11:41:50 +0200 Subject: [PATCH] feat: failed evaluation mark the evaluation job as failed --- modules/buildbot/buildbot_nix.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/buildbot/buildbot_nix.py b/modules/buildbot/buildbot_nix.py index b705aaf..e58d5a6 100644 --- a/modules/buildbot/buildbot_nix.py +++ b/modules/buildbot/buildbot_nix.py @@ -111,20 +111,25 @@ class NixEvalCommand(buildstep.ShellMixin, steps.BuildStep): # if the command passes extract the list of stages result = cmd.results() + failures = 0 if result == util.SUCCESS: # create a ShellCommand for each stage and add them to the build jobs = [] - for line in self.observer.getStdout().split("\n"): if line != "": job = json.loads(line) if "error" not in job.keys(): jobs.append(job) + else: + failures +=1 self.build.addStepsAfterCurrentStep( [BuildTrigger(scheduler="nix-build", name="nix-build", jobs=jobs)] ) - return result + if failures > 0: + return util.FAILURE + else: + return result class RetryCounter: