34 lines
746 B
Plaintext
34 lines
746 B
Plaintext
load("@this//:environment.star", "environment")
|
|
def buildDockerFolder(
|
|
dockerFile,
|
|
image,
|
|
tag,
|
|
folder,
|
|
name,
|
|
):
|
|
return {
|
|
"name": "build-{name}".format(
|
|
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-docker-folder.sh {dockerFile} {image} {tag}".format(
|
|
image = image,
|
|
dockerFile = dockerFile,
|
|
tag = tag,
|
|
),
|
|
],
|
|
}
|