From 67684351de92b0396945b4a8439480f43175c44b Mon Sep 17 00:00:00 2001 From: "Gerber, Mike" Date: Fri, 12 Feb 2021 11:09:47 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20Try=20out=20Drone=20CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.star | 15 +++++++-------- Dockerfile-ocrd_tesserocr | 3 ++- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.drone.star b/.drone.star index 04ccbfb..59678f4 100644 --- a/.drone.star +++ b/.drone.star @@ -1,10 +1,8 @@ def main(ctx): if ctx.build.event == "tag": name = "release" - dry_run = False elif ctx.build.branch == "master": name = "master" - dry_run = True else: return @@ -20,20 +18,21 @@ def main(ctx): "FORCE_DOWNLOAD=y ./build-tmp-XXX" ] }, - step_for("core", dry_run), - step_for("ocrd_tesserocr", dry_run), + step_for(ctx, "core"), + step_for(ctx, "ocrd_tesserocr"), ] } -def step_for(sub_image, dry_run): - auto_tag = not dry_run +def step_for(ctx, sub_image): return { "name": "build %s" % sub_image, "image": "plugins/docker", "settings": { - "dry_run": dry_run, - "auto_tag": auto_tag, + "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, diff --git a/Dockerfile-ocrd_tesserocr b/Dockerfile-ocrd_tesserocr index db78b86..045ad37 100644 --- a/Dockerfile-ocrd_tesserocr +++ b/Dockerfile-ocrd_tesserocr @@ -1,4 +1,5 @@ -FROM mikegerber/my_ocrd_workflow-core +ARG DRONE_COMMIT="latest" +FROM mikegerber/my_ocrd_workflow-core:$DRONE_COMMIT ARG PIP_INSTALL="pip install --no-cache-dir" ARG TESSDATA_BEST_VERSION="4.0.0"