3.8 KiB
Rehearse tagged delivery
A rehearsal exercises the real tag-triggered Woodpecker delivery workflow before
choosing a production version. It creates a temporary diagnostic tag and page,
verifies the job's page and any binary and checksum contents, and removes only
recorded diagnostic resources after CI is quiescent. Routine publish remains
complete when its production source tag is confirmed; rehearsal is an optional,
explicit diagnostic.
Configure delivery with both local and CI credential selections. Configure
rehearsal.woodpecker with the CI server URL, its numeric repository ID, the
exact workflow and delivery step names, and a separate local Woodpecker API
token file. The rehearsal.selector defaults to root; multi-product
repositories select the corresponding maintained mapping row. The
configuration reference defines the fields. The
root workflow,
self-bootstrap workflow,
multi-product example, and
source-only example show the dispatch
and CI secret injection.
The local forge credential must be able to read and delete the diagnostic release and its assets, the CI delivery credential must be able to create them, and native Git authentication must permit creating and deleting the diagnostic tag. The separate Woodpecker credential needs read access to the repository, pipelines, workflows, steps, and logs. CI must inject the configured delivery token into the actual tagged job; local readiness cannot establish that injection. Keep local token files private and ignored by Git. Do not register them as CI secrets through ReleaseKit.
releasekit validate --operation rehearsal
releasekit test --json
releasekit test --ref HEAD~1 --timeout 45m
The selected profile must be committed in the checkout at the captured commit. The branch, index, and worktree need not be a final release candidate and are not changed by capture. The diagnostic version and tag identify a random attempt; neither is a production release identifier. The actual CI job builds and delivers through the selected profile, then reads back its page and declared assets while build output remains available. A page-only profile generates no binary artifacts.
The output separates workflow execution, build, hosted verification, and
cleanup. It records a private attempt under the Git common directory, or in an
explicit ignored/private --record-dir. If observation fails or cleanup cannot
establish quiescence, retain the exact printed record and use:
releasekit test-resume --record /path/to/attempt.json
releasekit test-cleanup --record /path/to/attempt.json
Recovery reads the committed profile selected by the record, using current local
credential files. --token-file and --woodpecker-token-file override those
paths. The library's Rehearse, ResumeRehearsal, and CleanupRehearsal
accept credentials explicitly and do not load ambient tokens. Their result and
error may both contain useful information. RehearsalTimeout values use the
same nanosecond units as time.Duration; a zero observation timeout waits for
context cancellation, and a zero cleanup timeout selects the two-minute default.
Cleanup rechecks every matching pipeline and the recorded tag and page identity. An active or unobservable job, missing pipeline evidence, or a conflicting resource leaves cleanup pending or reports a conflict. Cancellation stops local observation and does not cancel the CI job. A fresh bounded cleanup context may still clean resources when quiescence is established. CI history, notifications, webhooks, and later operator-initiated reruns are outside the cleanup result. See the record and result formats for transport and retained evidence.