fixed docker registry access
Some checks failed
ci/woodpecker/push/db Pipeline failed

This commit is contained in:
Stephan D
2025-11-07 01:32:31 +01:00
parent dbc77a7156
commit 2954dcde7b
2 changed files with 49 additions and 18 deletions

View File

@@ -35,24 +35,7 @@ steps:
REGISTRY_URL: registry.sendico.io
MONGO_VERSION: latest
commands:
- |
set -euo
mkdir -p ci/prod/env
set -a
. ./ci/prod/.env.runtime
. ./.env.version
set +a
test -s secrets/REGISTRY_USER && test -s secrets/REGISTRY_PASS
CREDS="$(cat secrets/REGISTRY_USER):$(cat secrets/REGISTRY_PASS)"
skopeo copy --all \
docker://docker.io/library/mongo:${MONGO_VERSION} \
docker://${REGISTRY_URL}/mirror/mongo:${APP_V} \
--dest-creds "$CREDS"
INSPECT=$(skopeo inspect docker://${REGISTRY_URL}/mirror/mongo:${APP_V} --creds "$CREDS")
DIGEST="$(printf '%s' "$INSPECT" | tr -d '\n' | sed -n 's/.*"Digest"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p')"
test -n "$DIGEST"
printf 'MONGO_TAG=%s\nMONGO_DIGEST=%s\n' "$APP_V" "$DIGEST" | tee .env.lock ci/prod/env/.env.lock.db
cat .env.lock
- bash ci/prod/scripts/lock-db.sh
- name: deploy
image: alpine:latest