|
|
@ -2,11 +2,9 @@ def main(ctx):
|
|
|
|
if ctx.build.event == "tag":
|
|
|
|
if ctx.build.event == "tag":
|
|
|
|
name = "release"
|
|
|
|
name = "release"
|
|
|
|
dry_run = False
|
|
|
|
dry_run = False
|
|
|
|
auto_tag = True
|
|
|
|
|
|
|
|
elif ctx.build.branch == "master":
|
|
|
|
elif ctx.build.branch == "master":
|
|
|
|
name = "master"
|
|
|
|
name = "master"
|
|
|
|
dry_run = True
|
|
|
|
dry_run = True
|
|
|
|
auto_tag = False
|
|
|
|
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
return
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
@ -22,17 +20,22 @@ def main(ctx):
|
|
|
|
"FORCE_DOWNLOAD=y ./build-tmp-XXX"
|
|
|
|
"FORCE_DOWNLOAD=y ./build-tmp-XXX"
|
|
|
|
]
|
|
|
|
]
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
step_for("core", dry_run),
|
|
|
|
"name": "build core",
|
|
|
|
step_for("ocrd_tesserocr", dry_run),
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def step_for(sub_image, dry_run):
|
|
|
|
|
|
|
|
auto_tag = not dry_run
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
"name": "build %s" % sub_image,
|
|
|
|
"image": "plugins/docker",
|
|
|
|
"image": "plugins/docker",
|
|
|
|
"settings": {
|
|
|
|
"settings": {
|
|
|
|
"dry_run": dry_run,
|
|
|
|
"dry_run": dry_run,
|
|
|
|
"auto_tag": auto_tag,
|
|
|
|
"auto_tag": auto_tag,
|
|
|
|
"username": { "from_secret": "docker_username" },
|
|
|
|
"username": { "from_secret": "docker_username" },
|
|
|
|
"password": { "from_secret": "docker_password" },
|
|
|
|
"password": { "from_secret": "docker_password" },
|
|
|
|
"repo": "mikegerber/my_ocrd_workflow-core",
|
|
|
|
"repo": "mikegerber/my_ocrd_workflow-%s" % sub_image,
|
|
|
|
"dockerfile": "Dockerfile-core",
|
|
|
|
"dockerfile": "Dockerfile-%s" % sub_image,
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|