added permanent artifact links for latest green builds: /branches/<branch-key>/... serves the latest green build's artifacts (green-only, resolved per request), keepLatestGreen retention protection, permanent artifact-index page, and latestGreenUrl links in the branches view

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Michael Hoennig
2026-07-08 15:35:16 +02:00
co-authored by Claude Fable 5
parent 83e70e73c3
commit bb06c8b731
25 changed files with 820 additions and 18 deletions
@@ -12,6 +12,13 @@ import java.time.Instant
object ArtifactKeys {
fun branchKey(branch: String): String = "${sanitize(branch)}-${sha256Prefix(branch)}"
/**
* The hash-free key of the permanent `/branches/<key>/…` artifact URLs, e.g.
* `feature/demo` → `feature_demo`. Unlike [branchKey] it is not necessarily
* unique; lookups must reject ambiguous matches.
*/
fun permanentBranchKey(branch: String): String = sanitize(branch)
fun buildKey(
branch: String,
startedAt: Instant,