taler-deployment

Deployment scripts and configuration files
Log | Files | Refs | README

commit 863ee79d9a82203e87cf6612f1c41e2651e2b8df
parent 3c6698f56feeece6bfbe4140b9d4b4f677aa0411
Author: Devan Carpenter <devan@taler.net>
Date:   Tue, 11 Jul 2023 18:47:20 -0400

buildbot: switch from podman to docker

version of podman is too old and has bugs. use docker as the container
runtime for now.

docker requires that the user be in the "docker" group. "sg" is used to
ensure that the command is excuted with the correct group id.

Diffstat:
Mbuildbot/master.cfg | 15++++-----------
1 file changed, 4 insertions(+), 11 deletions(-)

diff --git a/buildbot/master.cfg b/buildbot/master.cfg @@ -194,10 +194,7 @@ def container_add_step(HALT_ON_FAILURE, return steps.ShellSequence( name=stepName, commands=[ - util.ShellArg(command=["podman", "run", "--rm", - "--volume", f"{WORK_DIR}:/workdir", - "--workdir", "/workdir", - CONTAINER_NAME, jobCmd], + util.ShellArg(command=["sg", "docker", "-c", f"docker run --rm --user $(id -u):$(id -g) --volume {WORK_DIR}:/workdir --workdir /workdir {CONTAINER_NAME} {jobCmd}"], logname='run inside container', haltOnFailure=HALT_ON_FAILURE), ], @@ -208,13 +205,9 @@ def container_add_step(HALT_ON_FAILURE, return steps.ShellSequence( name=stepName, commands=[ - util.ShellArg(command=["podman", "build", "-t", CONTAINER_NAME, - "-f", containerFile, "."], + util.ShellArg(command=["sg", "docker", "-c", f"docker build -t {CONTAINER_NAME} -f {containerFile} ."], logname='build container', haltOnFailure=True), - util.ShellArg(command=["podman", "run", "--rm", - "--volume", f"{WORK_DIR}:/workdir", - "--workdir", "/workdir", - CONTAINER_NAME, jobCmd], + util.ShellArg(command=["sg", "docker", "-c", f"docker run --rm --user $(id -u):$(id -g) --volume {WORK_DIR}:/workdir --workdir /workdir {CONTAINER_NAME} {jobCmd}"], logname='run inside container', haltOnFailure=HALT_ON_FAILURE), ], @@ -1229,7 +1222,7 @@ EMAIL_ALERTS.append("packaging-ubuntu-builder") # 19: CONTAINER FACTORY ##################### ############################################# ## -# These factories uses the standard podman worker. +# These factories uses the standard container worker. WORKERS.append(Worker("container-worker", "container-pass")) #