diff --git a/.drone.star b/.drone.star deleted file mode 100644 index 623c861..0000000 --- a/.drone.star +++ /dev/null @@ -1,74 +0,0 @@ -def main(ctx): - tags = [ctx.build.commit] - - if ctx.build.event == "tag": - name = "release" - elif ctx.build.branch == "master": - name = "master" - tags.append("latest") - 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" - ] - }, - # We can't glob and have to add here manually... - step_for(ctx, "core", tags), - step_for(ctx, "core-cuda10.0", tags), - step_for(ctx, "core-cuda10.1", tags), - - step_for(ctx, "dinglehopper", tags), - step_for(ctx, "ocrd_calamari", tags), - step_for(ctx, "ocrd_calamari03", tags), - step_for(ctx, "ocrd_cis", tags), - step_for(ctx, "ocrd_fileformat", tags), - step_for(ctx, "ocrd_olena", tags), - step_for(ctx, "ocrd_segment", tags), - step_for(ctx, "ocrd_tesserocr", tags), - step_for(ctx, "ocrd_wrap", tags), - step_for(ctx, "sbb_binarization", tags), - step_for(ctx, "sbb_textline_detector", tags), - step_for(ctx, "eynollah", tags), - step_for(ctx, "ocrd_anybaseocr", tags), - { - "name": "notify", - "image": "drillster/drone-email", - "settings": { - "host": "172.17.0.1", - "port": "25", - "from": "drone@ci.moegen-wir.net", - }, - "when": { - "status": [ "success", "failure" ] - } - } - ] - } - ] - - -def step_for(ctx, sub_image, tags): - return { - "name": "build %s" % sub_image, - "image": "plugins/docker", - "settings": { - "build_args": [ - "DRONE_COMMIT=%s" % ctx.build.commit, - ], - "tags": tags, - "username": { "from_secret": "docker_username" }, - "password": { "from_secret": "docker_password" }, - "repo": "quratorspk/ocrd-galley-%s" % sub_image, - "dockerfile": "Dockerfile-%s" % sub_image, - } - } diff --git a/.github/workflows/build-subimage.yml b/.github/workflows/build-subimage.yml index afc3ccf..0fe98ce 100644 --- a/.github/workflows/build-subimage.yml +++ b/.github/workflows/build-subimage.yml @@ -50,7 +50,7 @@ jobs: context: . file: Dockerfile-${{ inputs.subimage }} build-args: | - DRONE_COMMIT=sha-${{ github.sha }} + GIT_COMMIT=sha-${{ github.sha }} BUILDKIT_INLINE_CACHE=1 tags: ${{ steps.meta.outputs.tags }} push: true diff --git a/Dockerfile-dinglehopper b/Dockerfile-dinglehopper index d7c9bc1..0ed198c 100644 --- a/Dockerfile-dinglehopper +++ b/Dockerfile-dinglehopper @@ -1,5 +1,5 @@ -ARG DRONE_COMMIT="latest" -FROM quratorspk/ocrd-galley-core:$DRONE_COMMIT +ARG GIT_COMMIT="latest" +FROM quratorspk/ocrd-galley-core:$GIT_COMMIT ARG PIP_INSTALL="pip install --no-cache-dir" ARG DINGLEHOPPER_COMMIT="dcc10c5" diff --git a/Dockerfile-eynollah b/Dockerfile-eynollah index b932fc3..7e6c5d1 100644 --- a/Dockerfile-eynollah +++ b/Dockerfile-eynollah @@ -1,5 +1,5 @@ -ARG DRONE_COMMIT="latest" -FROM quratorspk/ocrd-galley-core-cuda10.0:$DRONE_COMMIT +ARG GIT_COMMIT="latest" +FROM quratorspk/ocrd-galley-core-cuda10.0:$GIT_COMMIT ARG PIP_INSTALL="pip install --no-cache-dir" ARG EYNOLLAH_VERSION="0.0.10" diff --git a/Dockerfile-ocrd_anybaseocr b/Dockerfile-ocrd_anybaseocr index fb14dd7..403bfcc 100644 --- a/Dockerfile-ocrd_anybaseocr +++ b/Dockerfile-ocrd_anybaseocr @@ -1,5 +1,5 @@ -ARG DRONE_COMMIT="latest" -FROM quratorspk/ocrd-galley-core-cuda10.1:$DRONE_COMMIT +ARG GIT_COMMIT="latest" +FROM quratorspk/ocrd-galley-core-cuda10.1:$GIT_COMMIT ARG PIP_INSTALL="pip install --no-cache-dir" ARG OCRD_ANYBASEOCR_VERSION="1.8.2" diff --git a/Dockerfile-ocrd_calamari b/Dockerfile-ocrd_calamari index 6181494..7926fb7 100644 --- a/Dockerfile-ocrd_calamari +++ b/Dockerfile-ocrd_calamari @@ -1,5 +1,5 @@ -ARG DRONE_COMMIT="latest" -FROM quratorspk/ocrd-galley-core-cuda10.1:$DRONE_COMMIT +ARG GIT_COMMIT="latest" +FROM quratorspk/ocrd-galley-core-cuda10.1:$GIT_COMMIT # XXX https://github.com/OCR-D/core/issues/642 diff --git a/Dockerfile-ocrd_calamari03 b/Dockerfile-ocrd_calamari03 index 8119d2a..10b0646 100644 --- a/Dockerfile-ocrd_calamari03 +++ b/Dockerfile-ocrd_calamari03 @@ -1,5 +1,5 @@ -ARG DRONE_COMMIT="latest" -FROM quratorspk/ocrd-galley-core-cuda10.0:$DRONE_COMMIT +ARG GIT_COMMIT="latest" +FROM quratorspk/ocrd-galley-core-cuda10.0:$GIT_COMMIT ARG PIP_INSTALL="pip install --no-cache-dir" diff --git a/Dockerfile-ocrd_cis b/Dockerfile-ocrd_cis index 5790d74..e967893 100644 --- a/Dockerfile-ocrd_cis +++ b/Dockerfile-ocrd_cis @@ -1,5 +1,5 @@ -ARG DRONE_COMMIT="latest" -FROM quratorspk/ocrd-galley-core:$DRONE_COMMIT +ARG GIT_COMMIT="latest" +FROM quratorspk/ocrd-galley-core:$GIT_COMMIT ARG PIP_INSTALL="pip install --no-cache-dir" ARG OCRD_CIS_VERSION="0.1.5" diff --git a/Dockerfile-ocrd_fileformat b/Dockerfile-ocrd_fileformat index 0275598..060f79c 100644 --- a/Dockerfile-ocrd_fileformat +++ b/Dockerfile-ocrd_fileformat @@ -1,5 +1,5 @@ -ARG DRONE_COMMIT="latest" -FROM quratorspk/ocrd-galley-core:$DRONE_COMMIT +ARG GIT_COMMIT="latest" +FROM quratorspk/ocrd-galley-core:$GIT_COMMIT ARG PIP_INSTALL="pip install --no-cache-dir" ARG OCRD_FILEFORMAT_VERSION="0.5.0" diff --git a/Dockerfile-ocrd_olena b/Dockerfile-ocrd_olena index 1b1fcd0..21b2e04 100644 --- a/Dockerfile-ocrd_olena +++ b/Dockerfile-ocrd_olena @@ -1,5 +1,5 @@ -ARG DRONE_COMMIT="latest" -FROM quratorspk/ocrd-galley-core:$DRONE_COMMIT +ARG GIT_COMMIT="latest" +FROM quratorspk/ocrd-galley-core:$GIT_COMMIT ARG PIP_INSTALL="pip install --no-cache-dir" ARG OCRD_OLENA_VERSION="1.3.0" diff --git a/Dockerfile-ocrd_segment b/Dockerfile-ocrd_segment index 2dfee9e..44699ff 100644 --- a/Dockerfile-ocrd_segment +++ b/Dockerfile-ocrd_segment @@ -1,5 +1,5 @@ -ARG DRONE_COMMIT="latest" -FROM quratorspk/ocrd-galley-core:$DRONE_COMMIT +ARG GIT_COMMIT="latest" +FROM quratorspk/ocrd-galley-core:$GIT_COMMIT ARG PIP_INSTALL="pip install --no-cache-dir" ARG OCRD_SEGMENT_VERSION="0.1.21" diff --git a/Dockerfile-ocrd_tesserocr b/Dockerfile-ocrd_tesserocr index a558f33..e34c0df 100644 --- a/Dockerfile-ocrd_tesserocr +++ b/Dockerfile-ocrd_tesserocr @@ -1,5 +1,5 @@ -ARG DRONE_COMMIT="latest" -FROM quratorspk/ocrd-galley-core:$DRONE_COMMIT +ARG GIT_COMMIT="latest" +FROM quratorspk/ocrd-galley-core:$GIT_COMMIT ARG PIP_INSTALL="pip install --no-cache-dir" ARG TESSDATA_BEST_VERSION="4.0.0" diff --git a/Dockerfile-ocrd_wrap b/Dockerfile-ocrd_wrap index d38bc2c..518d306 100644 --- a/Dockerfile-ocrd_wrap +++ b/Dockerfile-ocrd_wrap @@ -1,5 +1,5 @@ -ARG DRONE_COMMIT="latest" -FROM quratorspk/ocrd-galley-core:$DRONE_COMMIT +ARG GIT_COMMIT="latest" +FROM quratorspk/ocrd-galley-core:$GIT_COMMIT ARG PIP_INSTALL="pip install --no-cache-dir" ARG OCRD_WRAP_VERSION="0.1.7" diff --git a/Dockerfile-sbb_binarization b/Dockerfile-sbb_binarization index e8c6496..cb70e95 100644 --- a/Dockerfile-sbb_binarization +++ b/Dockerfile-sbb_binarization @@ -1,5 +1,5 @@ -ARG DRONE_COMMIT="latest" -FROM quratorspk/ocrd-galley-core-cuda10.0:$DRONE_COMMIT +ARG GIT_COMMIT="latest" +FROM quratorspk/ocrd-galley-core-cuda10.0:$GIT_COMMIT ARG PIP_INSTALL="pip install --no-cache-dir" ARG SBB_BINARIZATION_VERSION="0.0.10" diff --git a/Dockerfile-sbb_textline_detector b/Dockerfile-sbb_textline_detector index d4f3b75..cf17738 100644 --- a/Dockerfile-sbb_textline_detector +++ b/Dockerfile-sbb_textline_detector @@ -1,5 +1,5 @@ -ARG DRONE_COMMIT="latest" -FROM quratorspk/ocrd-galley-core-cuda10.0:$DRONE_COMMIT +ARG GIT_COMMIT="latest" +FROM quratorspk/ocrd-galley-core-cuda10.0:$GIT_COMMIT ARG PIP_INSTALL="pip install --no-cache-dir" ARG SBB_TEXTLINE_DETECTOR_COMMIT="c4df3d6"