fix(ci): Add auth debug step, switch back to buildx
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

Added a docker-auth-test step that:
- Shows credential lengths (for debugging)
- Tests docker login directly with Harbor

This will help identify if the issue is with secrets injection
or with how buildx handles authentication.

Reverted to woodpeckerci/plugin-docker-buildx since plugins/docker
requires server-side WOODPECKER_PLUGINS_PRIVILEGED config.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-01 17:24:51 -06:00
parent b1be63edd6
commit 211c532fb0

View File

@@ -84,13 +84,36 @@ steps:
# ======================
# Requires secrets: harbor_username, harbor_password
# Debug step - test registry auth before building
docker-auth-test:
image: docker:cli
environment:
HARBOR_USER:
from_secret: harbor_username
HARBOR_PASS:
from_secret: harbor_password
commands:
- echo "Testing Harbor authentication..."
- echo "Username length:" $(echo -n "$HARBOR_USER" | wc -c)
- echo "Password length:" $(echo -n "$HARBOR_PASS" | wc -c)
- echo "$HARBOR_PASS" | docker login reg.mosaicstack.dev -u "$HARBOR_USER" --password-stdin
- echo "Login successful!"
- docker logout reg.mosaicstack.dev
when:
- branch: [main, develop]
event: [push, manual]
depends_on:
- build
docker-build-api:
image: plugins/docker
image: woodpeckerci/plugin-docker-buildx
settings:
registry: reg.mosaicstack.dev
repo: mosaic/api
dockerfile: apps/api/Dockerfile
context: .
platforms:
- linux/amd64
tags:
- "${CI_COMMIT_SHA:0:8}"
- latest
@@ -102,15 +125,17 @@ steps:
- branch: [main, develop]
event: [push, manual]
depends_on:
- build
- docker-auth-test
docker-build-web:
image: plugins/docker
image: woodpeckerci/plugin-docker-buildx
settings:
registry: reg.mosaicstack.dev
repo: mosaic/web
dockerfile: apps/web/Dockerfile
context: .
platforms:
- linux/amd64
build_args:
- NEXT_PUBLIC_API_URL=https://api.mosaicstack.dev
tags:
@@ -124,15 +149,17 @@ steps:
- branch: [main, develop]
event: [push, manual]
depends_on:
- build
- docker-auth-test
docker-build-postgres:
image: plugins/docker
image: woodpeckerci/plugin-docker-buildx
settings:
registry: reg.mosaicstack.dev
repo: mosaic/postgres
dockerfile: docker/postgres/Dockerfile
context: docker/postgres
platforms:
- linux/amd64
tags:
- "${CI_COMMIT_SHA:0:8}"
- latest
@@ -144,4 +171,4 @@ steps:
- branch: [main, develop]
event: [push, manual]
depends_on:
- build
- docker-auth-test