Pipeline integration: estimate build size + order an ephemeral builder before the build step #25

Open
opened 2026-07-11 10:59:48 +03:00 by admin · 0 comments

Why: CI pipelines (Woodpecker) must integrate estimator→order→build→release flow. Pre-step runs nix-estimate, creates sized EphemeralBuilder, waits for node ready, runs build, releases after.

What: Pre-step (or ci-fleet-publish plugin) that:

  1. Runs nix-estimate .#target --system <arch> --json on build target
  2. Creates/requests EphemeralBuilder with spec.requirements from sizing
  3. Waits for node ready (k8s API or custom gate)
  4. Runs build step (bound to ephemeral node via nodeAffinity)
  5. Releases node after build (triggers reaper via DemandGone or TTL)

Acceptance:

  • Pipeline can extract nix-estimator sizing for any Nix target
  • EphemeralBuilder ordered with correct spec.requirements {arch, cores, ramGb}
  • Build runs on right-sized ephemeral node, not on persistent always-on agent
  • Node released and destroyed after build completion
  • End-to-end tested with real amd64 build (queue to destroy)

Links: Ties to oleks/ci-scripts#18 (modern-CI epic), oleks/builder-arbitrage estimate-consumer and lifecycle issues, oleks/nix-estimator (schema), oleks/fleet#116, oleks/builder-arbitrage#247

**Why**: CI pipelines (Woodpecker) must integrate estimator→order→build→release flow. Pre-step runs nix-estimate, creates sized EphemeralBuilder, waits for node ready, runs build, releases after. **What**: Pre-step (or ci-fleet-publish plugin) that: 1. Runs `nix-estimate .#target --system <arch> --json` on build target 2. Creates/requests EphemeralBuilder with spec.requirements from sizing 3. Waits for node ready (k8s API or custom gate) 4. Runs build step (bound to ephemeral node via nodeAffinity) 5. Releases node after build (triggers reaper via DemandGone or TTL) **Acceptance**: - [ ] Pipeline can extract nix-estimator sizing for any Nix target - [ ] EphemeralBuilder ordered with correct spec.requirements {arch, cores, ramGb} - [ ] Build runs on right-sized ephemeral node, not on persistent always-on agent - [ ] Node released and destroyed after build completion - [ ] End-to-end tested with real amd64 build (queue to destroy) **Links**: Ties to oleks/ci-scripts#18 (modern-CI epic), oleks/builder-arbitrage estimate-consumer and lifecycle issues, oleks/nix-estimator (schema), oleks/fleet#116, oleks/builder-arbitrage#247
admin added the p1epic:modern-ci labels 2026-07-11 10:59:48 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: oleks/ci-scripts#25