diff --git a/openspec/changes/add-release-ci-packaging/design.md b/openspec/changes/add-release-ci-packaging/design.md index 12a0308..e3254a2 100644 --- a/openspec/changes/add-release-ci-packaging/design.md +++ b/openspec/changes/add-release-ci-packaging/design.md @@ -32,7 +32,10 @@ - Alternative: Tastefully's selective scripts (`shouldIBuild.sh` and others). Rejected because they bring scripts and SonarQube steps this repo does not have, and they make tags uneven across images. - Alternative: also build on pull requests. Rejected for now; it can be added later without changing the images. 2. **Tests gate the push.** Tastefully builds with `-Dmaven.test.skip=true`; Co-Lite runs `verify`, so a red test stops the run before any push. Every image is pushed only after all builds succeed: build all first, push all after. -3. **Image names:** `gitea.containerverse.dev/ngqile/co-lite-`, where `` is `api-gateway`, `mobile-api`, `service-auth`, `service-system`, `service-counter`, `service-member`, `service-log`, `service-email` or `admin-portal`. Tags are `` and `latest`. The owner segment follows the repository owner. If the repo moves to the `solvway` org, it is the one line to change. +3. **Image names:** `gitea.containerverse.dev/solvway/co-lite-`, where `` is `api-gateway`, `mobile-api`, `service-auth`, `service-system`, `service-counter`, `service-member`, `service-log`, `service-email` or `admin-portal`. Tags are `` and `latest`. + - The repo moves from `ngqile` to the `solvway` org before anything is deployed, so the images take the `solvway` names from the start. + - CI uses the secret names Tastefully uses (`PACKAGE_USER`, `PACKAGE_RW_KEY`), so after the transfer it can pick up the org's secrets and runners. + - Until the transfer, pushes are not expected to work. The build and the image check are proven locally instead. 4. **Profile at runtime.** Images are built with the default profile. The entrypoint already honours a `BUILD_PROFILE` environment variable, so the deployer can override it without a rebuild. The handover says to leave it unset. 5. **Image hygiene.** Each module gets a `.dockerignore` where it lacks one, so `.env`, `appkeys.json`, key files and `local/` never enter the build context. A CI step lists every image's files and fails if `appkeys.json`, `.env`, `*.pem`, `*.p12` or a service-account JSON is present. 6. **Database package** (`sql/`): @@ -50,11 +53,11 @@ ## Risks / Trade-offs -- [No runner serves `ngqile/co-lite`] → The first run shows it. The fix is enabling a runner for the repo, or moving the repo under `solvway`, which also changes decision 3's owner segment. +- [CI cannot push before the repo moves to `solvway`] → Expected. Deployment starts only after the transfer. Until then, the build and image check are proven locally, and the first `main` run after the transfer is the first push. - [The base image `solvway/docker-java-21` needs a registry login to pull] → CI logs in before building. - [The production SQL drifts from `local/seed/`] → Header comments name the source file, and task 1.2 diffs the package against the seed. - [Forgot-password does not work without SMTP] → Stated in the handover. Admins sign in with the first-admin flow, and other users get passwords from an admin through the existing user screens. ## Migration Plan -Merge, then add the two Actions secrets. The first push to `main` publishes the images. The DBA applies the package, and the deployer follows `docs/deployment.md`. Rollback means deploying the previous SHA tag. +Merge. After the repo moves to `solvway`, confirm the `PACKAGE_USER` and `PACKAGE_RW_KEY` secrets and a runner are available to it. The next push to `main` publishes the images. The DBA applies the package, and the deployer follows `docs/deployment.md`. Rollback means deploying the previous SHA tag. diff --git a/openspec/changes/add-release-ci-packaging/proposal.md b/openspec/changes/add-release-ci-packaging/proposal.md index 5acd8d4..e682cb2 100644 --- a/openspec/changes/add-release-ci-packaging/proposal.md +++ b/openspec/changes/add-release-ci-packaging/proposal.md @@ -36,7 +36,7 @@ None. ## Impact -- New `.gitea/workflows/ci.yml`. It needs repo Actions secrets `PACKAGE_USER` and `PACKAGE_RW_KEY` (registry login), and an Actions runner that serves `ngqile/co-lite`. +- New `.gitea/workflows/ci.yml`, publishing to `gitea.containerverse.dev/solvway/co-lite-`. It needs the `PACKAGE_USER` and `PACKAGE_RW_KEY` secrets (registry login) and an Actions runner. Both are expected from the `solvway` org once the repo is transferred there, which happens before deployment. - Dockerfiles of the nine modules (fixes only where production needs them). - New `docs/deployment.md`. - New SQL under `openspec/changes/add-release-ci-packaging/sql/`. diff --git a/openspec/changes/add-release-ci-packaging/tasks.md b/openspec/changes/add-release-ci-packaging/tasks.md index 00ad45e..86b4c5e 100644 --- a/openspec/changes/add-release-ci-packaging/tasks.md +++ b/openspec/changes/add-release-ci-packaging/tasks.md @@ -32,7 +32,7 @@ Design: `design.md`. All tasks run serially: each touches a build file, CI or SQ Before merge: lint the workflow with `actionlint`, or a YAML parse if `actionlint` is 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. After merge, the first `main` run is green and the registry shows the nine SHA tags. + - Verify: the local dry-run builds and checks all nine images. The first real run and push happen after the repo moves to `solvway`. ## 3. Handover @@ -44,5 +44,5 @@ Design: `design.md`. All tasks run serially: each touches a build file, CI or SQ ## Workflow follow-up -- Whole-branch review, push, PR to main and merge, then confirm the first CI run and the registry tags, then archive on its own branch. -- The user adds the `PACKAGE_USER` and `PACKAGE_RW_KEY` repo secrets, and confirms a runner serves `ngqile/co-lite`. +- Whole-branch review, push, PR to main and merge, then archive on its own branch. +- After the repo moves to `solvway`: confirm the `PACKAGE_USER` and `PACKAGE_RW_KEY` secrets and a runner, then check that the first `main` run pushes the nine SHA tags.