feat: centralize candidate promotion pipelines
Platform CI tests / QuickStack deploy action tests (push) Successful in 27s
Nuvisphere/Platform-CI: Immutable QuickStack OCI deployment / Build once and deploy exact digest (push) Successful in 25s

This commit is contained in:
2026-08-20 11:40:37 +02:00
parent 8f41d273d7
commit a4247d2697
7 changed files with 752 additions and 3 deletions
+54 -1
View File
@@ -4,7 +4,7 @@ This repository is the central, public source for Nuvisphere's Gitea scoped work
Workflow code contains no credentials. Each consuming organization supplies its own `REGISTRY_USERNAME`, `REGISTRY_TOKEN` and `QUICKSTACK_API_TOKEN` Actions secrets. Organization-owned `Platform-CI` repositories only provide the scoped workflow entrypoint and call this central action.
Repositories opt into deployment by committing `.quickstack/deploy.json`. The central workflow builds every declared target once, publishes an immutable `sha-<commit>` OCI tag to the Gitea Container Registry and changes QuickStack to the exact `@sha256:` digest. A failed rollout or postflight automatically restores the previous QuickStack configuration.
Repositories opt into deployment by committing `.quickstack/deploy.json`. Version 1 manifests continue to build and deploy every target independently. Version 2 separates immutable build artifacts from QuickStack applications, so one artifact can be deployed to multiple processes and a Production pipeline can promote the exact tested Staging digest without rebuilding. A failed rollout or postflight automatically restores the previous QuickStack configuration.
Example:
@@ -35,3 +35,56 @@ Example:
```
Pull requests build all matching targets without logging in, publishing or deploying. Pushes and manual runs publish and deploy. The commit marker `[skip quickstack-deploy]` skips a push deliberately.
## Candidate and promotion pipelines
Use manifest version 2 when one image serves multiple applications or Production must promote a tested candidate:
```json
{
"version": 2,
"registry": "gitea.nuvisphere.de",
"artifacts": [
{
"name": "web",
"image": "example/web",
"dockerfile": "Dockerfile",
"buildArgs": { "BUILD_SHA": "$sha12" },
"requiredFiles": ["/app/server.js"]
}
],
"pipelines": [
{
"name": "staging",
"branch": "staging",
"strategy": "candidate",
"applications": [
{ "name": "web", "artifact": "web", "appId": "app-staging" },
{
"name": "worker",
"artifact": "web",
"appId": "app-worker-staging",
"dependsOn": ["web"],
"environment": { "PROCESS": "worker" }
}
]
},
{
"name": "production",
"branch": "prod",
"strategy": "promote",
"source": { "mergeParent": 2, "requireTreeMatch": true },
"release": {
"versionFile": "content/releases/latest.json",
"notesFile": "content/releases/$version.md",
"skipMarker": "[skip prod-release]"
},
"applications": [
{ "name": "web", "artifact": "web", "appId": "app-production" }
]
}
]
}
```
Candidate pipelines build every artifact once, push `sha-<commit>`, resolve the registry digest and deploy applications in dependency order. Promotion pipelines require a merge parent with an identical Git tree, pull the existing candidate, verify required container files, add the SemVer alias, deploy the exact digests, create the immutable tag and publish the canonical Gitea release. Tag creation does not trigger another scoped pipeline because the workflow listens only to branch pushes.