Adds the release-packaging main spec and points the handover at the archived SQL package. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM
61 lines
2.9 KiB
Markdown
61 lines
2.9 KiB
Markdown
## Purpose
|
|
|
|
Releases are built, tested and published as container images that someone else can deploy, and the production database can be created from a package that holds no development credentials.
|
|
|
|
## ADDED Requirements
|
|
|
|
### Requirement: Images published from main
|
|
|
|
Every push to `main` SHALL build the eight backend services and the admin portal, run their tests, and push one image per module to `gitea.containerverse.dev`, tagged with the commit SHA and with `latest`.
|
|
|
|
#### Scenario: Green push publishes all images
|
|
|
|
- **GIVEN** a push to `main` whose build and tests pass
|
|
- **WHEN** CI finishes
|
|
- **THEN** the registry holds the nine images tagged with that commit's SHA
|
|
- **AND** `latest` points at the same images
|
|
|
|
#### Scenario: Red test publishes nothing
|
|
|
|
- **GIVEN** a push to `main` with a failing test in any module
|
|
- **WHEN** CI runs
|
|
- **THEN** the run fails
|
|
- **AND** no image is pushed for that commit
|
|
|
|
#### Scenario: Other branches do not publish
|
|
|
|
- **WHEN** a commit is pushed to a branch other than `main`
|
|
- **THEN** no image is pushed
|
|
|
|
### Requirement: Images carry no secrets or environment config
|
|
|
|
Images SHALL contain no secrets, keys or passwords, and no setting whose name marks it as a secret SHALL have a built-in default value. Every service MUST read its database, Redis, gateway, Pub/Sub, JWT and API-key settings from environment variables or mounted files at runtime, and any other environment-specific value baked into an image MUST be overridable by an environment variable.
|
|
|
|
#### Scenario: Image layers hold no key material
|
|
|
|
- **WHEN** a published image's files are inspected
|
|
- **THEN** there is no `.env` file, `appkeys.json`, Pub/Sub service-account key or private key in it
|
|
|
|
#### Scenario: One image runs in any environment
|
|
|
|
- **GIVEN** the same image tag
|
|
- **WHEN** it is started with a different set of environment variables and mounted files
|
|
- **THEN** it connects to the database, Redis and other services those settings name
|
|
|
|
### Requirement: Production database package has no development login
|
|
|
|
The production database package SHALL create the five schemas, their tables, the reference data, the Co-Lite company, the new lead tables and the back-office modules. It MUST NOT create any user with a known password. The first administrator MUST be created from a password hash the operator supplies, and MUST be forced to change the password at first sign-in.
|
|
|
|
#### Scenario: Package applied to an empty server
|
|
|
|
- **GIVEN** an empty MySQL 8 server
|
|
- **WHEN** the DBA runs the package files in the documented order
|
|
- **THEN** every service starts against it
|
|
- **AND** no `admin` user with the development password exists
|
|
|
|
#### Scenario: First administrator signs in
|
|
|
|
- **GIVEN** the first-admin template applied with an operator-generated bcrypt hash
|
|
- **WHEN** that administrator signs in to the admin portal
|
|
- **THEN** they are sent to change their password before any other screen
|