fix(ci): honour FORCE_REBUILD from both manual trigger forms #11

Merged
pat-s merged 1 commit from fix/force-rebuild-both-trigger-forms into main 2026-09-18 07:14:24 +00:00
Owner

Motivation

The FORCE_REBUILD escape hatch added in #9 only reads a bare $FORCE_REBUILD.
Checking crow --help shows the two manual trigger forms pass values by different mechanisms:

  • crow pipeline start -p KEY=value — "custom parameters to inject into the step environment", so a bare $FORCE_REBUILD picks it up.
  • crow pipeline create --branch main --var key=value — a crow substitution variable, only visible as ${FORCE_REBUILD}.

Triggering a fresh run of main is a create, not a start.
So in exactly the case the flag exists for, it would have been silently ignored and the run would have skipped every Alpine version it was meant to rebuild, with no error to notice.

Change

Read the substituted ${FORCE_REBUILD} into FORCE_REBUILD_VAR and accept either source.

Crow blanks an unsupplied substitution variable rather than failing, as this repo already established in 8eacc0a, so a plain cron run still takes the dedup path.

Verification

crow lint .crow/ passes.
Simulating crow's substitution over all four permutations:

cron run, nothing set (crow blanks the subst)        -> dedup (skip existing)
pipeline create --var FORCE_REBUILD=1                -> rebuild all
pipeline start -p FORCE_REBUILD=1                    -> rebuild all
both set                                             -> rebuild all

Superseded in part by #12. This change is necessary but not sufficient: declaring FORCE_REBUILD as a UI variable makes it substitute its default, which inverts the [ -n ... ] test used here, and overwrite: false on the upload step would discard a forced rebuild regardless. See #12.

## Motivation The `FORCE_REBUILD` escape hatch added in #9 only reads a bare `$FORCE_REBUILD`. Checking `crow --help` shows the two manual trigger forms pass values by different mechanisms: - `crow pipeline start -p KEY=value` — *"custom parameters to inject into the step environment"*, so a bare `$FORCE_REBUILD` picks it up. - `crow pipeline create --branch main --var key=value` — a crow **substitution** variable, only visible as `${FORCE_REBUILD}`. Triggering a fresh run of `main` is a `create`, not a `start`. So in exactly the case the flag exists for, it would have been silently ignored and the run would have skipped every Alpine version it was meant to rebuild, with no error to notice. ## Change Read the substituted `${FORCE_REBUILD}` into `FORCE_REBUILD_VAR` and accept either source. Crow blanks an unsupplied substitution variable rather than failing, as this repo already established in 8eacc0a, so a plain cron run still takes the dedup path. ## Verification `crow lint .crow/` passes. Simulating crow's substitution over all four permutations: ``` cron run, nothing set (crow blanks the subst) -> dedup (skip existing) pipeline create --var FORCE_REBUILD=1 -> rebuild all pipeline start -p FORCE_REBUILD=1 -> rebuild all both set -> rebuild all ``` --- **Superseded in part by #12.** This change is necessary but not sufficient: declaring `FORCE_REBUILD` as a UI variable makes it substitute its default, which inverts the `[ -n ... ]` test used here, and `overwrite: false` on the upload step would discard a forced rebuild regardless. See #12.
The escape hatch added in #9 only read a bare $FORCE_REBUILD, which covers
`crow pipeline start -p FORCE_REBUILD=1`, where the parameter is injected
into the step environment. It does not cover
`crow pipeline create --branch main --var FORCE_REBUILD=1`, which passes a
crow substitution variable instead.

Triggering a fresh run of main is a `create`, so the flag would have been
silently ignored in exactly the case it is needed, and the run would skip
every Alpine version it was meant to rebuild.

Read the substituted ${FORCE_REBUILD} into FORCE_REBUILD_VAR and accept
either source. Crow blanks an unsupplied substitution variable rather than
failing, as recorded in 8eacc0a, so a plain cron run still takes the dedup
path.
pat-s merged commit 02dbe3ad5f into main 2026-09-18 07:14:24 +00:00
pat-s changed title from fix(ci): honour FORCE_REBUILD from both manual trigger forms to fix(ci): declare FORCE_REBUILD as a variable and make it actually take effect 2026-09-18 07:17:14 +00:00
pat-s changed title from fix(ci): declare FORCE_REBUILD as a variable and make it actually take effect to fix(ci): honour FORCE_REBUILD from both manual trigger forms 2026-09-18 07:17:29 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
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
devxy/r-builds!11
No description provided.