Spec: phpboyscout/cicd v0.13.0 — hugo-pages mr_gate¶
- Repository:
gitlab.com/phpboyscout/cicd - Released as:
v0.13.0(minor — new input /feat). - Driver: the v0.12.0
hugo-pagescomponent added ahugo-buildjob that runs on merge-request/branch pipelines (a build gate). The three Hugo sites (blog, dusthole, shutterandstove) historically ran theirpagesjob only on default-branch + schedule — no MR/branch build — to keep a fast direct-to-main posting workflow (content is audited locally). v0.12.0's always-on gate is new friction they did not have.
Decisions¶
D1 — mr_gate boolean input (default true)¶
Add mr_gate to hugo-pages:
true(default) —hugo-buildruns on every non-tag pipeline (MR, branch, default, schedule): the pre-merge build gate introduced in v0.12.0. Best for sites that use an MR workflow.false(loose) —hugo-buildruns only where it deploys (deploy_branch+schedule). MR/feature-branch pushes trigger no build, exactly like a classic Pages-only-on-main setup. For content sites with a direct-to-main, locally-audited workflow.
Implemented via first-match rules: on hugo-build:
rules:
- if: '$CI_COMMIT_TAG'
when: never
- if: '"$[[ inputs.mr_gate ]]" == "true"' # gated: run everywhere
when: on_success
- if: '$CI_COMMIT_BRANCH == "$[[ inputs.deploy_branch ]]"' # loose: deploy ref
- if: '$CI_PIPELINE_SOURCE == "schedule"' # loose: schedule
The pages deploy job is unchanged (always deploy_branch + schedule,
never MR). In loose mode an MR simply has no jobs — no regression versus
the original hand-rolled blogs, which behaved identically.
D2 — Default stays true¶
Default true preserves v0.12.0 semantics (no silent behaviour change
for any existing consumer) and keeps the safer, gate-by-default posture
for future doc-site consumers. The three blogs opt into false.
D3 — Consumer adoption¶
The blog migrations (held, not yet merged) adopt [email protected]
with mr_gate: false:
- blog, shutterandstove, dusthole → mr_gate: false.
D4 — Versioning¶
New input → feat(hugo-pages): → v0.13.0 (minor).