load("@this//:environment.star", "environment") def buildFolder(name, folder): return { "name": "build-{folder} {name}".format( folder=folder, name=name, ), "image": "docker:stable-dind", "volumes": [ { "name": "dockersock", "path": "/var/run", }, ], "environment": environment([ "local-docker-registry", "registry-password", ]), "commands": [ "cd {folder}".format(folder=folder), 'docker login $${LOCAL_DOCKER_REGISTRY} --username client --password "$${REGISTRY_PASSWORD}"', "sh build.sh {name} $${{LOCAL_DOCKER_REGISTRY}}".format(name = name), ], }