[sdlc] Implement semantic-release versioning for local and deployed apps
Problem to solve
The knowledge-graph repository contains two apps that need independent versioning and releases:
- Local KG - the existing Rust application with semantic releases
- Deployed KG - the new Docker image for indexer/web-server
Semantic-release is designed for a 1:1 relationship between git repo and released app. There's no straightforward way to version two apps in one repository, which creates challenges for release notes and versioning.
Proposed solutions
-
Isolate semantic-release configs with different tag prefixes (e.g.,
local-v0.15.3vsdeployed-v0.17.5)- Hook into the
generateNotesstep for semantic-release - Configure git commit parsing to check if commit/MR title contains identifier (e.g., "deployed")
- Enforce MRs to have identification via CI
- Caveat: Requires discipline to always include identifier in titles, but manageable
- Hook into the
-
Create a new repository for Docker image releases, helm chart releases, and sandbox deployments
- Pull commit messages for release notes via GitLab API using labels (
deployedorsdlc) - Caveat: Additional repository overhead and complexity
- Pull commit messages for release notes via GitLab API using labels (
-
Use other release tools or manual versioning
- Caveat: Loss of automation benefits
-
Reuse local KG version for deployed version
- Caveat: Shared release notes issues plus weird versioning, especially for major releases
Goal
Investigate and implement Option 1 - configure semantic-release with:
- Different tag prefixes for local vs deployed apps
- Custom
generateNotesstep to filter commits/MRs by identifier - CI enforcement for MR title conventions