From ec04b35b39512899243c36855254d162ac5f5766 Mon Sep 17 00:00:00 2001 From: unkin-agent Date: Sat, 15 Aug 2026 16:34:44 +1000 Subject: [PATCH] ci: trust artifactapi internal CA when pushing docker-internal The v0.1.0 release pipeline built the runtime image fine but failed the push to artifactapi.k8s.syd1.au.unkin.net/docker-internal with a TLS x509 unknown-authority error: buildkit did not trust artifactapi's Vault-signed cert. Stage the internal CA into the shared workspace via the almalinux9-base image (already trusts the unkin CA; same image the RPM release pipelines use to reach artifactapi over HTTPS) and point the docker-buildx plugin at it through buildkit_config. buildx copies the referenced CA into the buildkitd container at builder-create time, so the push handshake now verifies. No credentials needed: anonymous push to docker-internal is allowed for trusted clients. --- .woodpecker/docker.yaml | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/.woodpecker/docker.yaml b/.woodpecker/docker.yaml index e611658..9662029 100644 --- a/.woodpecker/docker.yaml +++ b/.woodpecker/docker.yaml @@ -24,17 +24,44 @@ steps: memory: 6Gi cpu: 4 + # Stage the internal (Vault) CA into the shared workspace so the buildkit push + # below can verify artifactapi's TLS cert. almalinux9-base already trusts the + # unkin CA (it is the image the RPM release pipelines use to reach artifactapi + # over HTTPS), so its consolidated trust bundle contains the chain we need. + - name: ca-trust + image: git.unkin.net/unkin/almalinux9-base:20260606 + commands: + - cp /etc/pki/tls/certs/ca-bundle.crt "$${CI_WORKSPACE}/artifactapi-ca.crt" + depends_on: [publish] + backend_options: + kubernetes: + serviceAccountName: default + resources: + requests: + memory: 256Mi + cpu: 250m + limits: + memory: 512Mi + cpu: 1 + # Build the runtime image and push it to the artifactapi local docker registry. + # buildkit_config points buildkit at the staged CA so the TLS handshake with + # artifactapi (Vault-signed cert) verifies; buildx copies the referenced CA + # into the buildkitd container under /etc/buildkit/certs when it creates the + # builder. CI_WORKSPACE is runtime-only so the path is the fixed workspace path. - name: docker image: woodpeckerci/plugin-docker-buildx settings: registry: artifactapi.k8s.syd1.au.unkin.net repo: artifactapi.k8s.syd1.au.unkin.net/docker-internal/jellyfin-ha dockerfile: Dockerfile.runtime + buildkit_config: | + [registry."artifactapi.k8s.syd1.au.unkin.net"] + ca = ["/woodpecker/src/git.unkin.net/unkin/jellyfin-ha/artifactapi-ca.crt"] tags: - ${CI_COMMIT_TAG} - latest - depends_on: [publish] + depends_on: [ca-trust] backend_options: kubernetes: serviceAccountName: default