2020-05-10 16:16:11 +00:00
|
|
|
load("@this//:environment.star", "environment")
|
|
|
|
def buildFolder(name, folder):
|
|
|
|
return {
|
|
|
|
"name": "build-{folder} {name}".format(
|
|
|
|
folder=folder,
|
|
|
|
name=name,
|
|
|
|
),
|
2020-08-13 09:40:33 +00:00
|
|
|
"image": "docker:stable-dind",
|
2020-05-10 16:16:11 +00:00
|
|
|
"volumes": [
|
|
|
|
{
|
|
|
|
"name": "dockersock",
|
|
|
|
"path": "/var/run",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"environment": environment([
|
|
|
|
"local-docker-registry",
|
2020-05-11 13:37:26 +00:00
|
|
|
"registry-password",
|
2020-05-10 16:16:11 +00:00
|
|
|
]),
|
|
|
|
"commands": [
|
|
|
|
"cd {folder}".format(folder=folder),
|
2020-05-11 14:08:31 +00:00
|
|
|
'docker login $${LOCAL_DOCKER_REGISTRY} --username client --password "$${REGISTRY_PASSWORD}"',
|
2020-05-10 16:16:11 +00:00
|
|
|
"sh build.sh {name} $${{LOCAL_DOCKER_REGISTRY}}".format(name = name),
|
|
|
|
],
|
|
|
|
}
|