diff --git a/common_factories.py b/common_factories.py index 09ef8096..033ecc40 100644 --- a/common_factories.py +++ b/common_factories.py @@ -9,6 +9,7 @@ from buildbot.process.properties import Property from buildbot.steps.mtrlogobserver import MTR + # Local from constants import MTR_ENV, SAVED_PACKAGE_BRANCHES, test_type_to_mtr_arg from utils import ( @@ -23,9 +24,9 @@ hasDockerLibrary, hasEco, hasFailed, - hasFiles, hasGalera, hasInstall, + hasPackagesGenerated, hasRpmLint, hasS3, hasUpgrade, @@ -755,7 +756,7 @@ def getRpmAutobakeFactory(mtrDbPool): """ ), doStepIf=( - lambda step: hasFiles(step) + lambda step: hasPackagesGenerated(step) and savePackageIfBranchMatch(step, SAVED_PACKAGE_BRANCHES) ), descriptionDone=util.Interpolate( @@ -797,7 +798,7 @@ def getRpmAutobakeFactory(mtrDbPool): doStepIf=( lambda step: hasInstall(step) and savePackageIfBranchMatch(step, SAVED_PACKAGE_BRANCHES) - and hasFiles(step) + and hasPackagesGenerated(step) ), ) ) @@ -816,7 +817,7 @@ def getRpmAutobakeFactory(mtrDbPool): doStepIf=( lambda step: hasUpgrade(step) and savePackageIfBranchMatch(step, SAVED_PACKAGE_BRANCHES) - and hasFiles(step) + and hasPackagesGenerated(step) ), ) ) diff --git a/master.cfg b/master.cfg index af0579d7..27dc0b7b 100644 --- a/master.cfg +++ b/master.cfg @@ -258,7 +258,7 @@ f_deb_autobake.addStep( doStepIf=( lambda step: hasInstall(step) and savePackageIfBranchMatch(step, SAVED_PACKAGE_BRANCHES) - and hasFiles(step) + and hasPackagesGenerated(step) ), ) ) @@ -277,7 +277,7 @@ f_deb_autobake.addStep( doStepIf=( lambda step: hasUpgrade(step) and savePackageIfBranchMatch(step, SAVED_PACKAGE_BRANCHES) - and hasFiles(step) + and hasPackagesGenerated(step) ), ) ) diff --git a/utils.py b/utils.py index 86fbaab8..0a9ff479 100644 --- a/utils.py +++ b/utils.py @@ -207,7 +207,7 @@ def createDebRepo() -> steps.ShellCommand: ), ], doStepIf=( - lambda step: hasFiles(step) + lambda step: hasPackagesGenerated(step) and savePackageIfBranchMatch(step, SAVED_PACKAGE_BRANCHES) ), ) @@ -249,7 +249,7 @@ def uploadDebArtifacts() -> steps.ShellCommand: ), ], doStepIf=( - lambda step: hasFiles(step) + lambda step: hasPackagesGenerated(step) and savePackageIfBranchMatch(step, SAVED_PACKAGE_BRANCHES) ), descriptionDone=util.Interpolate( @@ -444,7 +444,7 @@ def dockerfile(props: IProperties) -> str: # checks if the list of files is empty -def hasFiles(step: BuildStep) -> bool: +def hasPackagesGenerated(step: BuildStep) -> bool: return len(step.getProperty("packages")) >= 1