Each Java module's build context now holds only its jar, and local/image-check.sh fails an image that carries a key file, a private key under any name, or a secret setting with a built-in default. It found one: service-email defaulted SMSS360_APIKEY to a real-looking key, now removed (the key is in git history and must be rotated). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM
3.3 KiB
Tasks
Design: design.md. All tasks run serially: each touches a build file, CI or SQL.
1. Images and database package
-
1.1 Make the images production-safe (design decisions 4 and 5).
- Add a
.dockerignoreto each of the nine modules that lacks one. - Check each Dockerfile for baked-in config or secrets.
- Write
local/image-check.sh <image>. It fails when an image holdsappkeys.json,.env,*.pem,*.p12or a Google service-account JSON.
Tests first: build one image with a planted
appkeys.jsonin its module folder and show the check fails (red). Add the.dockerignoreand show it passes (green). Then build all nine images locally, and run the check on each.- The check also fails on a secret-named setting (KEY, SECRET, PASSWORD, PWD, TOKEN) that has a built-in default in the jar's config. It found one:
SMSS360_APIKEYin service-email carried a real-looking key as its default, which is now removed. That key is in git history, so it must be rotated outside this change. - Scope:
solvway-*/Dockerfile,solvway-*/.dockerignore,local/image-check.sh,solvway-services-email/src/main/resources/application.yml(the key default only) - Verify: all nine
docker buildcommands succeed, andlocal/image-check.shpasses on each image.
- Add a
-
1.2 Write the production database package (design decision 6):
sql/00to04with source headers.Prove it: load
00to04into a throwaway MySQL 8 container (not the dev database). For04, use a hash of a throwaway password. Point the local stack at it, then show:- the services start;
- no
adminrow has the dev password hash; - signing in as the new admin is sent to the password change.
- Diff the package against
local/seed/and record the only differences: the dev admin rows removed and file04added. - Scope:
openspec/changes/add-release-ci-packaging/sql/** - Verify: the throwaway-database check above.
2. CI
-
2.1 Add
.gitea/workflows/ci.yml(design decisions 1 to 3 and 5).- The workflow runs on push to
mainonly. - It runs Maven
verifywith-T 1C, then builds all nine images, runslocal/image-check.shon each, and pushes after every image has built, tagged with the SHA andlatest. - It logs in to the registry with
PACKAGE_USERandPACKAGE_RW_KEY.
Before merge: lint the workflow with
actionlint, or a YAML parse ifactionlintis unavailable. Dry-run the build-and-check part of the job locally with the same commands, without the push.- Scope:
.gitea/workflows/** - Verify: the local dry-run builds and checks all nine images. The first real run and push happen after the repo moves to
solvway.
- The workflow runs on push to
3. Handover
- 3.1 Write
docs/deployment.md(design decision 7).- Cross-check every environment variable against each module's
application.yml, the portal'sprocess.envuses and the gateway'sappkeys.jsonpath, so none is missing or extra. - Secret templates use placeholders only, never real values.
- Scope:
docs/deployment.md - Verify: a script lists the variables each module reads and finds each one in the document.
- Cross-check every environment variable against each module's
Workflow follow-up
- Whole-branch review, push, PR to main and merge, then archive on its own branch.
- After the repo moves to
solvway: confirm thePACKAGE_USERandPACKAGE_RW_KEYsecrets and a runner, then check that the firstmainrun pushes the nine SHA tags.