feat: the pipeline renders every workflow per event and dry-runs the agent image on PRs #17

Merged
morten-olsen merged 2 commits from mc/301fe680-3690-440d-bdfc-bfc07395e47f into main 2026-10-07 18:56:26 +02:00
Contributor

Summary

Retro 68b656b8: PR #10 broke every pipeline (unquoted ${CI_COMMIT_TAG##v} is empty outside a tag, so the YAML no longer parsed), and tag pipelines were the first run of the agent image build.

  • scripts/check-pipelines.mjs (task ci:pipelines, now the first step of ci:quality): renders every .woodpecker/*.yaml as pull_request, push, manual, tag and cron with that event's CI_* values (substitutions ${V}, $V, ${V##p}, ${V:o:l}, as Woodpecker applies them; other forms fail loudly), then parses the result and requires steps, an image per step, and existing depends_on targets. Non-CI_* shell variables are left alone, as Woodpecker does.
  • image-agent.yaml also runs on pull_request/manual: same executable build, then Kaniko with --no-push. Publish and scan stay tag-only. No depends_on: quality (would never resolve on tags), so it runs beside quality.
  • Tests: scripts/check-pipelines.test.ts (5 tests, run by the root vitest).
  • Adds yaml (already in the lockfile transitively) as a root devDependency.

Evidence

  • node scripts/check-pipelines.mjs: 45 renderings pass.
  • Against the tree at aad334a (PR #10) it fails: image-agent.yaml as a pull_request event: Nested mappings are not allowed in compact mappings.
  • woodpecker-cli lint .woodpecker/image-agent.yaml: valid. eslint, prettier, vitest on the new files pass.
  • Not run here: the Kaniko PR step itself (no docker/bun in my container); this PR's own pipeline is its first run.

Tests (part 1)

The three tests named in the retro were already fixed on main (e4cefd2, be6b066, 1f0af7b, 2b9f552) with condition-based vi.waitFor/eventually. I looked for others: remaining waits are condition-based. The remaining fixed setTimeouts (50–500 ms in run.test.ts, slack.*.test.ts) only precede "nothing happened" assertions, so they cannot fail spuriously, only pass late; 5 ms ones only order timestamps. No further changes.

Merge danger / rollback

Adds a PR step that builds the agent image (bun executable build plus Kaniko), so PRs take longer. Rollback: revert the PR.

🤖 Generated with Claude Code

## Summary Retro 68b656b8: PR #10 broke every pipeline (unquoted `${CI_COMMIT_TAG##v}` is empty outside a tag, so the YAML no longer parsed), and tag pipelines were the first run of the agent image build. - `scripts/check-pipelines.mjs` (`task ci:pipelines`, now the first step of `ci:quality`): renders every `.woodpecker/*.yaml` as pull_request, push, manual, tag and cron with that event's `CI_*` values (substitutions `${V}`, `$V`, `${V##p}`, `${V:o:l}`, as Woodpecker applies them; other forms fail loudly), then parses the result and requires steps, an image per step, and existing `depends_on` targets. Non-`CI_*` shell variables are left alone, as Woodpecker does. - `image-agent.yaml` also runs on pull_request/manual: same executable build, then Kaniko with `--no-push`. Publish and scan stay tag-only. No `depends_on: quality` (would never resolve on tags), so it runs beside quality. - Tests: `scripts/check-pipelines.test.ts` (5 tests, run by the root vitest). - Adds `yaml` (already in the lockfile transitively) as a root devDependency. ## Evidence - `node scripts/check-pipelines.mjs`: 45 renderings pass. - Against the tree at aad334a (PR #10) it fails: `image-agent.yaml as a pull_request event: Nested mappings are not allowed in compact mappings`. - `woodpecker-cli lint .woodpecker/image-agent.yaml`: valid. eslint, prettier, vitest on the new files pass. - Not run here: the Kaniko PR step itself (no docker/bun in my container); this PR's own pipeline is its first run. ## Tests (part 1) The three tests named in the retro were already fixed on main (e4cefd2, be6b066, 1f0af7b, 2b9f552) with condition-based `vi.waitFor`/`eventually`. I looked for others: remaining waits are condition-based. The remaining fixed `setTimeout`s (50–500 ms in run.test.ts, slack.*.test.ts) only precede "nothing happened" assertions, so they cannot fail spuriously, only pass late; 5 ms ones only order timestamps. No further changes. ## Merge danger / rollback Adds a PR step that builds the agent image (bun executable build plus Kaniko), so PRs take longer. Rollback: revert the PR. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
feat: a pull request dry-runs the agent image build, so a release tag is not its first run
All checks were successful
ci/woodpecker/push/quality Pipeline was successful
ci/woodpecker/pr/image-agent Pipeline was successful
ci/woodpecker/pr/quality Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/pr/docs Pipeline was successful
ci/woodpecker/pr/image Pipeline was successful
2dc06d8cfe
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No labels
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.

Dependencies

No dependencies set

Reference
ai/mission-control!17
No description provided.