Skip to content

Commit

Permalink
Save images only on prod
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
vladbogo committed Apr 29, 2024
1 parent 73aee6d commit 1211883
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions master-nonlatent/master.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
],
)
)
Expand Down Expand Up @@ -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),
)
)

Expand Down Expand Up @@ -1005,6 +1001,7 @@ c["builders"].append(
nextBuild=nextBuild,
canStartBuild=canStartBuild,
factory=f_dockerlibrary,
properties={"save_packages": os.getenv("ENVIRON") != "DEV"},
)
)

Expand Down

0 comments on commit 1211883

Please sign in to comment.