This repository has been archived on 2020-08-11. You can view files and clone it, but cannot push or open issues or pull requests.
stack/drone-starlark/repos/build-docker-folder-temp.star

32 lines
618 B
Plaintext
Raw Normal View History

2020-04-27 15:30:56 +00:00
load("@this//:environment.star", "environment")
def buildDockerFolder(
dockerFile,
image,
tag,
folder,
2020-04-27 16:06:03 +00:00
name,
2020-04-27 15:30:56 +00:00
):
return {
2020-04-27 16:06:03 +00:00
"name": "build-{name}".format(
name = name,
2020-04-27 15:30:56 +00:00
),
"image": "docker:dind",
"volumes": [
{
"name": "dockersock",
"path": "/var/run",
},
],
"environment": environment([
"local-docker-registry",
]),
"commands": [
"cd {folder}".format(folder=folder),
2020-04-27 16:06:03 +00:00
"sh build-docker-folder.sh {dockerFile} {image} {tag}".format(
2020-04-27 15:30:56 +00:00
image = image,
dockerFile = dockerFile,
tag = tag,
),
],
}