feat: add ship release and deploy skill
This commit is contained in:
1 parent
3d7e3adea1
commit
a9087b29f4
6 files changed
+216
No files matched your search
@@ -0,0 +1,21 @@
|
||||
# Packaging (docker org) subagent brief
|
||||
|
||||
Only for profile `full`. Template; append the shared rules from conventions.md.
|
||||
|
||||
```
|
||||
Create a new local git repo at ~/projects/docker/<name> (create the directory; if it already exists, extend it instead and bump the pin) that will become the private Gitea repo https://git.bjphoster.com/docker/<name>. It builds an OCI image of <name> WITHOUT vendoring the source: the dockerfile pins a source version and downloads the source at image build time, like an AUR PKGBUILD / deb / rpm packaging repo. Read the source at <source path> only (another agent may be rewriting its history).
|
||||
|
||||
Context:
|
||||
- Source repo: https://git.bjphoster.com/source/<name>.git, <PRIVATE|public>. Release tag `<version>` (no v prefix). <One paragraph from the source's own Dockerfile/README: build command, entrypoint, workdir, config path, data/auth dirs, exposed port, health URL.> Prefer a static build (Go: CGO_ENABLED=0) if it builds and works; check whether upstream needs cgo.
|
||||
- Reference repo for layout, README style, license, workflow style, variable/secret names and commit style: ~/projects/coredns-mysql (remote docker/coredns-mysql). Read all its files: `dockerfile`, `versions.env`, `.dockerignore`, `.gitea/workflows/image.yaml`, scripts/, MIT LICENSE (Copyright (c) 2026 Bryan Joshua Pedini), history `first commit` then `feat: ...`.
|
||||
- Architectures: linux/amd64 and linux/arm64 in one manifest. Cross-compile in the build stage (FROM --platform=$BUILDPLATFORM, GOARCH=$TARGETARCH); the runtime stage must need no RUN steps under emulation, so QEMU is not required; build with docker buildx (create a docker-container builder in the workflow if needed, log in before `buildx build --push`). The runner is act_runner on the host docker socket; you cannot test it, keep the workflow robust.
|
||||
- Pin: `versions.env` with <NAME>_VERSION=<version> and <NAME>_COMMIT=<sha the tag resolves to, or TODO if the tag does not exist yet; tell me>. The build must verify the fetched tag resolves to the pinned commit and fail otherwise. Provide a build arg for the source URL (default https://git.bjphoster.com/source/<name>.git) for local overrides. If the source repo is private, the download takes the token as a BuildKit secret (`--secret id=git_token,env=GIT_TOKEN`), never a build arg or layer content.
|
||||
- Workflow `.gitea/workflows/image.yaml`: on tag push (tag must equal <NAME>_VERSION, fail otherwise) and workflow_dispatch build and push `${GIT_HOST}/docker/<name>` tagged `<version>`, plus `latest` only for non-prerelease versions (no `-` suffix); on push to main build only. Pass version/commit/build date into the binary metadata. Smoke test the amd64 image before publishing (start with a minimal config, request <health URL>, expect 200), in the reference repo's script style.
|
||||
- README.md: what the image is, how it is built (source pinned in versions.env, downloaded at build time), how to bump (edit versions.env, commit, tag the same version), runtime usage (config mount path, persistent volumes), CI vars/secrets.
|
||||
|
||||
Testing (Docker only): build both platforms locally with buildx, overriding the source URL to a local source (e.g. serve a bare clone of <source path> from a temporary container on a docker network, or a --build-context), using the current HEAD of the source repo as the pinned commit for the test, read with git without modifying that repo. Verify the arm64 binary is aarch64 (`file` in a container), run the amd64 image with a tiny config and get 200 from <health URL>, verify the token secret is in no layer and not in `docker history`.
|
||||
|
||||
Commits: `first commit` (LICENSE + one-line README), then single-purpose commits (e.g. `feat: add <name> image build`, `ci: build and publish multi-arch image`, `docs: ...`). Add remote origin https://git.bjphoster.com/docker/<name>.git, do not push.
|
||||
|
||||
Report: file list, commit list, exact local build/test commands and results, the value(s) left as TODO, the Gitea vars/secrets the workflow needs.
|
||||
```
|
||||
Reference in new issue
Block a user