From 392329ea71b5a6ed82f8fdd582943a4ab74c9478 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Fri, 17 Nov 2023 18:37:39 +0100 Subject: [PATCH] fix conditionals when skipping cached builds --- buildbot_nix/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/buildbot_nix/__init__.py b/buildbot_nix/__init__.py index 1de8591..d396b5e 100644 --- a/buildbot_nix/__init__.py +++ b/buildbot_nix/__init__.py @@ -528,7 +528,7 @@ def nix_build_config( util.Secret("cachix-name"), util.Interpolate("result-%(prop:attr)s"), ], - doStepIf=lambda s: s.getProperty("isCached"), + doStepIf=lambda s: not s.getProperty("is_cached"), ) ) @@ -545,8 +545,8 @@ def nix_build_config( "-r", util.Property("out_path"), ], - doStepIf=lambda s: s.getProperty("isCached") - or s.getProperty("branch") + doStepIf=lambda s: not s.getProperty("is_cached") + and s.getProperty("branch") == s.getProperty("github.repository.default_branch"), ) ) @@ -554,7 +554,7 @@ def nix_build_config( steps.ShellCommand( name="Delete temporary gcroots", command=["rm", "-f", util.Interpolate("result-%(prop:attr)s")], - doStepIf=lambda s: s.getProperty("isCached"), + doStepIf=lambda s: not s.getProperty("is_cached"), ) ) if outputs_path is not None: