ci: restore image publishing with a persistent Docker config
CI / test (push) Successful in 1m38s
CI / chart (push) Successful in 2s
CI / image (push) Failing after 3m29s

A multi-stage kaniko build replaces / with the last stage's root filesystem,
which deletes $HOME/.docker/config.json. Kaniko then resolves credentials at
push time without them, asks the registry for an anonymous token and Gitea
rejects the upload with 401 reqPackageAccess.

Keep the Docker credential store in /kaniko/.docker for the whole image job via
DOCKER_CONFIG and let docker login write there directly. Restore the image job
and document that CI publishes images again.
This commit is contained in:
TapTap committed 2026-11-13 15:51:01 +00:00
1 parent 60e8dadce6
commit a6cc46b747
3 files changed
+61 -11

No files matched your search

+8 -8
View File
@@ -630,9 +630,15 @@ Cover extraction order: embedded APIC frame -> `cover.jpg`/`folder.jpg`/`front.j
- Runtime flags: `-XX:+UseSerialGC -Xmx256m` (adjustable via Helm).
- Non-root user (UID 10001), read-only root filesystem, `/tmp` as `emptyDir`, `/data` as PVC.
- Image: `gitea.tap-tap.win/taptap/audiomanager:<tag>` (registry paths must be lowercase).
- Images are built and pushed from a trusted machine, not from Gitea Actions; `imagePullSecret` is provided by the cluster.
- Gitea Actions builds and pushes `:sha-<commit>` and `:latest` on `main`, and the tag name for `v*` tags; `imagePullSecret` is provided by the cluster.
Build and push the image:
The CI image job uses kaniko and keeps `DOCKER_CONFIG=/kaniko/.docker` for the
whole job. A multi-stage build replaces `/` with the last stage's root
filesystem, which deletes `$HOME/.docker/config.json`; without this setting
kaniko would push anonymously and Gitea would reject it with
`401 reqPackageAccess`.
To build and push manually (or to deploy from a workstation):
```bash
docker login gitea.tap-tap.win
@@ -641,12 +647,6 @@ scripts/release.sh --tag v1.0.0 # explicit tag
scripts/release.sh --deploy # also apply the users secret and helm upgrade
```
`.gitea/workflows/ci.yaml` only runs the test suite, the smoke script and the Helm
chart lint. Image builds do not run in CI because the Gitea registry rejects
pushes from job containers (`401 Unauthorized: reqPackageAccess`), while the same
credentials work from a normal machine. Releases therefore stay a deliberate local
step; `scripts/release.sh --deploy` covers build, push and `helm upgrade`.
### 9.2 Helm chart
`charts/musicmanager` renders: