fix(ci): honour FORCE_REBUILD from both manual trigger forms #11
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/force-rebuild-both-trigger-forms"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Motivation
The
FORCE_REBUILDescape hatch added in #9 only reads a bare$FORCE_REBUILD.Checking
crow --helpshows 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_REBUILDpicks it up.crow pipeline create --branch main --var key=value— a crow substitution variable, only visible as${FORCE_REBUILD}.Triggering a fresh run of
mainis acreate, not astart.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}intoFORCE_REBUILD_VARand 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:
Superseded in part by #12. This change is necessary but not sufficient: declaring
FORCE_REBUILDas a UI variable makes it substitute its default, which inverts the[ -n ... ]test used here, andoverwrite: falseon the upload step would discard a forced rebuild regardless. See #12.fix(ci): honour FORCE_REBUILD from both manual trigger formsto fix(ci): declare FORCE_REBUILD as a variable and make it actually take effectfix(ci): declare FORCE_REBUILD as a variable and make it actually take effectto fix(ci): honour FORCE_REBUILD from both manual trigger forms