Add a Backstage-compatible global Bun CI/CD path #71

Open
opened 2026-11-22 13:23:23 +00:00 by martin · 0 comments
Owner

Summary

Add a selectively matched, Backstage-compatible path to the shared Bun CI/CD workflows: validate the application, publish a pinned OCI image, then open a GitOps promotion PR in the cluster repository.

Context

The shared bun-astro rule was intentionally narrowed in #68 to require an Astro config because the existing global verify step runs Astro-only commands. Backstage is a Bun workspace but is not an Astro application; do not broaden that rule or inject Astro checks into it.

The existing global Bun flow is the desired model: verification gates image publication, then a deployment workflow opens or updates a cluster promotion PR. However, the current workflow set is Astro-oriented, builds through .#image-$ENV, and its deploy workflow assumes the old martin/cluster repository path. Backstage's repository-owned validation is tracked in Personal/backstage#22, and the cluster target is now Personal/cluster.

Scope

  • Add an explicit Backstage/non-Astro Bun workflow rule or equivalent opt-in. Match Backstage-specific repository markers; do not match every Bun repository or weaken the Astro-only rule.
  • Reuse the shared workflow architecture and existing validation gates where compatible. Preserve Backstage's Node 24 runtime and native-module ABI requirements; do not run Astro-only checks.
  • Publish a versioned OCI image to Forgejo only after successful validation, using a reproducible production build and a tag policy that distinguishes dev images from release images.
  • Promote images by creating or updating a PR in Personal/cluster for the appropriate dev/prod Nixidy application. ArgoCD remains the deployment mechanism after the PR is merged; CI must not deploy directly to the cluster.
  • Keep registry and Forgejo write credentials in Woodpecker secrets; do not expose them in repository files or logs.
  • Coordinate workflow names and references with #69; do not rely on names that #69 is renaming.

Acceptance criteria

  • A Backstage-specific marker selects the intended shared workflow path, while an Astro project still selects the existing Astro flow and a non-Astro Bun project does not receive Astro-only steps.
  • Successful Backstage application validation gates image publication; validation uses the Backstage checks and supported Node/Bun ABI combination rather than Astro commands.
  • The production image starts from the same validated build, has an explicit version or digest, and is published to the Forgejo container registry only after validation passes.
  • Default-branch/dev and version-tag/release promotion behavior is deterministic and documented; image publication produces a reviewable PR updating the correct Personal/cluster dev or prod application, skipping unchanged updates.
  • The cluster PR is the only deployment handoff: the workflow does not modify the live cluster, and ArgoCD applies the change only after the GitOps PR is merged.
  • Required secrets are supplied through Woodpecker secrets, and the global workflow names/references follow the convention established by #69.
  • The NixOS configuration builds, the global workflow configuration validates, and pipeline evidence covers the Backstage path plus unchanged Astro behavior.
## Summary Add a selectively matched, Backstage-compatible path to the shared Bun CI/CD workflows: validate the application, publish a pinned OCI image, then open a GitOps promotion PR in the cluster repository. ## Context The shared `bun-astro` rule was intentionally narrowed in #68 to require an Astro config because the existing global verify step runs Astro-only commands. Backstage is a Bun workspace but is not an Astro application; do not broaden that rule or inject Astro checks into it. The existing global Bun flow is the desired model: verification gates image publication, then a deployment workflow opens or updates a cluster promotion PR. However, the current workflow set is Astro-oriented, builds through `.#image-$ENV`, and its deploy workflow assumes the old `martin/cluster` repository path. Backstage's repository-owned validation is tracked in [Personal/backstage#22](https://code.martials.no/Personal/backstage/issues/22), and the cluster target is now [Personal/cluster](https://code.martials.no/Personal/cluster). ## Scope - Add an explicit Backstage/non-Astro Bun workflow rule or equivalent opt-in. Match Backstage-specific repository markers; do not match every Bun repository or weaken the Astro-only rule. - Reuse the shared workflow architecture and existing validation gates where compatible. Preserve Backstage's Node 24 runtime and native-module ABI requirements; do not run Astro-only checks. - Publish a versioned OCI image to Forgejo only after successful validation, using a reproducible production build and a tag policy that distinguishes dev images from release images. - Promote images by creating or updating a PR in `Personal/cluster` for the appropriate dev/prod Nixidy application. ArgoCD remains the deployment mechanism after the PR is merged; CI must not deploy directly to the cluster. - Keep registry and Forgejo write credentials in Woodpecker secrets; do not expose them in repository files or logs. - Coordinate workflow names and references with #69; do not rely on names that #69 is renaming. ## Acceptance criteria - [ ] A Backstage-specific marker selects the intended shared workflow path, while an Astro project still selects the existing Astro flow and a non-Astro Bun project does not receive Astro-only steps. - [ ] Successful Backstage application validation gates image publication; validation uses the Backstage checks and supported Node/Bun ABI combination rather than Astro commands. - [ ] The production image starts from the same validated build, has an explicit version or digest, and is published to the Forgejo container registry only after validation passes. - [ ] Default-branch/dev and version-tag/release promotion behavior is deterministic and documented; image publication produces a reviewable PR updating the correct `Personal/cluster` dev or prod application, skipping unchanged updates. - [ ] The cluster PR is the only deployment handoff: the workflow does not modify the live cluster, and ArgoCD applies the change only after the GitOps PR is merged. - [ ] Required secrets are supplied through Woodpecker secrets, and the global workflow names/references follow the convention established by #69. - [ ] The NixOS configuration builds, the global workflow configuration validates, and pipeline evidence covers the Backstage path plus unchanged Astro behavior. ## Related - [Personal/backstage#22](https://code.martials.no/Personal/backstage/issues/22) — repository-owned Backstage quality gates. - [Personal/backstage#48](https://code.martials.no/Personal/backstage/issues/48) — CI image and caching optimization; not the image publishing/promotion work in this issue. - [Personal/cluster#88](https://code.martials.no/Personal/cluster/issues/88) — cluster-side Backstage deployment. - #68 — Astro-only matcher protection. - #69 — global workflow name prefix.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Personal/nixos-configuration#71
No description provided.