From 5f8df78501bbdf931a64fd013ae0ddf14c667e05 Mon Sep 17 00:00:00 2001 From: Markus Weigelt Date: Wed, 10 Jan 2024 17:43:27 +0100 Subject: [PATCH] Add OCR-D Manager base version to .env, docker-compose.yml and CI --- .env | 1 + .github/workflows/makefile-ci.yml | 2 +- .github/workflows/release-stable-pr.yml | 7 ++++++- _modules/ocrd_manager | 2 +- docker-compose.yml | 4 +++- 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.env b/.env index 1144471..5382ec3 100644 --- a/.env +++ b/.env @@ -1,6 +1,7 @@ COMPOSE_PROJECT_NAME=ocrd_kitodo # Manager SSH server +MANAGER_BASE_VERSION=latest # tag of ocrd/core from stage version MANAGER_IMAGE=ghcr.io/slub/ocrd_manager:latest # name and tag of image MANAGER_HOST=ocrd-manager # name/address of server (for Kitodo) MANAGER_PORT_SSH=9022 # host-side port to exposed SSH server (for external Kitodo) diff --git a/.github/workflows/makefile-ci.yml b/.github/workflows/makefile-ci.yml index 59095d7..964448a 100644 --- a/.github/workflows/makefile-ci.yml +++ b/.github/workflows/makefile-ci.yml @@ -141,7 +141,7 @@ jobs: - name: Dispatch OCR-D Manager workflow and waiting for completion uses: aurelien-baudet/workflow-dispatch@v2 with: - inputs: '{ "checkout-ref": "${{ env.MANAGER_CHECKOUT_REF }}", "image-tag": "${{ env.MANAGER_IMAGE_TAG }}" }' + inputs: '{ "checkout-ref": "${{ env.MANAGER_CHECKOUT_REF }}", "image-tag": "${{ env.MANAGER_IMAGE_TAG }}", "ocrd-core-version": "${{ steps.dotenv.outputs.MANAGER_BASE_VERSION }}" }' ref: 'main' repo: slub/ocrd_manager token: ${{ secrets.SUB_REPO_TOKEN }} diff --git a/.github/workflows/release-stable-pr.yml b/.github/workflows/release-stable-pr.yml index 0269033..5f81e8c 100644 --- a/.github/workflows/release-stable-pr.yml +++ b/.github/workflows/release-stable-pr.yml @@ -5,8 +5,11 @@ on: workflow_dispatch: inputs: ocrd-all-version: - description: Stable tag of ocrd/all from stage + description: Stable tag of ocrd/all from stage for OCR-D Controller required: true + ocrd-core-version: + description: Stable tag of ocrd/core from stage for OCR-D Manager + required: true jobs: build-pr: @@ -33,6 +36,7 @@ jobs: # Update .env sed -i 's|CONTROLLER_BASE_VERSION=maximum-cuda|CONTROLLER_BASE_VERSION=${{ github.event.inputs.ocrd-all-version }}|g' .env sed -i 's|CONTROLLER_IMAGE=ghcr.io/slub/ocrd_controller:latest|CONTROLLER_IMAGE=ghcr.io/slub/ocrd_controller:stable|g' .env + sed -i 's|MANAGER_BASE_VERSION=latest|MANAGER_BASE_VERSION=${{ github.event.inputs.ocrd-core-version }}|g' .env sed -i 's|MANAGER_IMAGE=ghcr.io/slub/ocrd_manager:latest|MANAGER_IMAGE=ghcr.io/slub/ocrd_manager:stable|g' .env sed -i 's|MONITOR_IMAGE=ghcr.io/slub/ocrd_monitor:latest|MONITOR_IMAGE=ghcr.io/slub/ocrd_monitor:stable|g' .env shell: bash @@ -47,6 +51,7 @@ jobs: - Update CHANGELOG.md - Update .env - Replace `CONTROLLER_BASE_VERSION` with `${{ github.event.inputs.ocrd-all-version }}` + - Replace `MANAGER_BASE_VERSION` with `${{ github.event.inputs.ocrd-core-version }}` - Replace `latest` with `stable` ## Manual steps to provide new release ${{ env.release_version }} diff --git a/_modules/ocrd_manager b/_modules/ocrd_manager index e8c06e0..01e7452 160000 --- a/_modules/ocrd_manager +++ b/_modules/ocrd_manager @@ -1 +1 @@ -Subproject commit e8c06e0e0a71a4249394f3f3790c3dbcc0e5fdbf +Subproject commit 01e745242acb0de6390614f1370ed951cc63aef3 diff --git a/docker-compose.yml b/docker-compose.yml index 1af93ab..21ac8ed 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,6 +9,9 @@ services: depends_on: - ocrd-controller - ocrd-database + build: + args: + VERSION: ${MANAGER_BASE_VERSION} ocrd-monitor: extends: @@ -44,7 +47,6 @@ services: service: ocrd-controller profiles: - with-ocrd-controller - build: args: VERSION: ${CONTROLLER_BASE_VERSION}