From 1211883ae269a31f0096ec6691e8ae848230378c Mon Sep 17 00:00:00 2001 From: Vlad Bogolin Date: Mon, 29 Apr 2024 10:28:41 +0300 Subject: [PATCH] Save images only on prod The dockerlibrary builder is always triggered only if packages need to be saved, so set the save_packages property to False for the DEV builder. --- master-nonlatent/master.cfg | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/master-nonlatent/master.cfg b/master-nonlatent/master.cfg index 6f80df4e..d0084065 100644 --- a/master-nonlatent/master.cfg +++ b/master-nonlatent/master.cfg @@ -599,9 +599,7 @@ f_wordpress.addStep( command=[ "sh", "-c", - util.Interpolate( - "podman pod exists wptest || podman pod create -n wptest" - ), + util.Interpolate("podman pod exists wptest || podman pod create -n wptest"), ], ) ) @@ -731,15 +729,13 @@ f_dockerlibrary.addStep( f_dockerlibrary.addStep( steps.ShellCommand( name="build quay.io manifest image for MariaDB", - env={'SAVE_PACKAGES': lambda step: str(savePackage(step))}, command=[ "bash", "-xc", util.Interpolate( - './docker-library-manifest.sh "%(prop:tarbuildnum)s" "%(prop:mariadb_version)s" "%(prop:parentbuildername)s" "%(prop:revision)s" "%(prop:branch)s" "${SAVE_PACKAGES:-False}"' + './docker-library-manifest.sh "%(prop:tarbuildnum)s" "%(prop:mariadb_version)s" "%(prop:parentbuildername)s" "%(prop:revision)s" "%(prop:branch)s" "%(prop:save_packages)s"' ), ], - doStepIf=lambda step: savePackage(step), ) ) @@ -1005,6 +1001,7 @@ c["builders"].append( nextBuild=nextBuild, canStartBuild=canStartBuild, factory=f_dockerlibrary, + properties={"save_packages": os.getenv("ENVIRON") != "DEV"}, ) )