You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ocrd-galley/.drone.star

42 lines
966 B
Plaintext

def main(ctx):
if ctx.build.event == "tag":
name = "release"
elif ctx.build.branch == "master":
name = "master"
else:
return
return {
"kind": "pipeline",
"name": name,
"steps": [
{
"name": "prepare data",
"image": "alpine",
"commands": [
"apk update && apk add bash curl",
"FORCE_DOWNLOAD=y ./build-tmp-XXX"
]
},
step_for(ctx, "core"),
step_for(ctx, "ocrd_tesserocr"),
]
}
def step_for(ctx, sub_image):
return {
"name": "build %s" % sub_image,
"image": "plugins/docker",
"settings": {
"auto_tag": True,
"purge": False,
"build_args": {
"DRONE_COMMIT": ctx.build.commit,
},
"username": { "from_secret": "docker_username" },
"password": { "from_secret": "docker_password" },
"repo": "mikegerber/my_ocrd_workflow-%s" % sub_image,
"dockerfile": "Dockerfile-%s" % sub_image,
}
}