drone/drone-starlark/repos/build-folder.star

25 lines
654 B
Plaintext

load("@this//:environment.star", "environment")
def buildFolder(name, folder):
return {
"name": "build-{folder} {name}".format(
folder=folder,
name=name,
),
"image": "docker: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),
],
}