commit d51edd3b8352fe2d8c7f16c28c7fb7c0cbbb60d4
parent a0319889d1fe79e87ca8d60c1972f787bc3206fa
Author: Florian Dold <dold@taler.net>
Date: Wed, 9 Sep 2026 02:38:04 +0200
buildbot: separate container image tags by repository and job
Diffstat:
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/buildbot/master.cfg b/buildbot/master.cfg
@@ -219,6 +219,13 @@ def container_add_step(HALT_ON_FAILURE,
containerFile="contrib/ci/Containerfile"):
print(f"HALT_ON_FAILURE: {HALT_ON_FAILURE}, WARN_ON_FAILURE: {WARN_ON_FAILURE}, CONTAINER_BUILD: {CONTAINER_BUILD}, CONTAINER_NAME: {CONTAINER_NAME}")
+ # Locally built images belong to this repository, job and architecture.
+ # A copied CONTAINER_NAME must not overwrite another builder's image
+ # between its build and run commands on the shared container worker.
+ # CONTAINER_NAME selects the image only for jobs using prebuilt images.
+ imageName = (f"localhost/buildbot/{repoName}/{stepName}:{CONTAINER_ARCH}"
+ if CONTAINER_BUILD else CONTAINER_NAME)
+
runCommand = ["podman", "--transient-store", "run", "--rm",
"--arch", CONTAINER_ARCH,
"--log-driver=none",
@@ -248,7 +255,7 @@ def container_add_step(HALT_ON_FAILURE,
runCommand += ["--volume", f"/run/user/{pwd.getpwnam('container-worker').pw_uid}/podman/podman.sock:/run/podman/podman.sock",
"--security-opt", "label=disable"]
- runCommand += [CONTAINER_NAME, jobCmd]
+ runCommand += [imageName, jobCmd]
# Halting jobs (including deployment) remain fatal even if they also
# request warnings. Only non-halting jobs may be advisory.
@@ -259,7 +266,7 @@ def container_add_step(HALT_ON_FAILURE,
warnOnFailure=advisory,
haltOnFailure=HALT_ON_FAILURE)
- buildArg = util.ShellArg(command=["podman", "build", "-t", CONTAINER_NAME,
+ buildArg = util.ShellArg(command=["podman", "build", "-t", imageName,
"--arch", CONTAINER_ARCH,
"-f", containerFile, "."],
logname='build container', haltOnFailure=True)