feat(ci): add a manual trigger for changelog site publish - #37141
feat(ci): add a manual trigger for changelog site publish#37141sfreudenthaler wants to merge 2 commits into
Conversation
|
Claude finished @sfreudenthaler's task in 1m 59s —— View job Code ReviewReviewed against New Issues
Neither is blocking. The rest — Docker Hub tag resolution, sha-preference matching the pipeline, the fallback path, and the paging caveat already called out in the · |
The changelog site publish phase is workflow_call: only, so when the release pipeline skips it -- any upstream failure or cancellation, since the job is gated on success() -- the only recovery is running the publisher locally with DOTCMS_DEVSITE_URL, _RELEASENOTES_TOKEN and _RELEASENOTES_ACCOUNT in hand. Adds cicd_manual_changelog-site-publish.yml, a workflow_dispatch wrapper around the existing phase, mirroring cicd_ai-release-notes-backfill.yml. Credentials stay in repo vars/secrets; an operator supplies only the release tag. The wrapper derives release_version from the tag, the sha-tagged docker image from Docker Hub's public API, and released_date from the release's own publishedAt so backfilling an older release does not stamp today's date. The phase gains force and released_date inputs, both defaulting to current behavior, so the release pipeline path is unchanged. force makes the --force override the phase comments already describe reachable from CI. The publish job sits behind a no-op approval gate on the changelog-site-publish environment (required_reviewers: dotDevelopers): this writes to the public docs site with a service-account token, and workflow_dispatch is open to every account with write access on this repo. Closes: #37136 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EbgDBJuoBrpJxh5qLMPorL
The phase gates its publish job on startsWith(release_tag, 'v'). A tag typed without the prefix resolved fine, passed the approval gate, and was then silently skipped -- the run reported success while nothing was published. Fails fast in resolve instead, before anyone is asked to approve. Found in review of #37141. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EbgDBJuoBrpJxh5qLMPorL
513fe3b to
76cebb1
Compare
|
Both findings addressed. 1. Silent no-op on a missing case "$RELEASE_TAG" in
v*) ;;
*) echo "Error: release_tag must start with 'v' (got '$RELEASE_TAG')"; exit 1;;
esacGood catch, and the failure mode was the bad kind: 2. Environment provisioning — the review assumed it is not yet provisioned; it is. Same for The caveat in the code comment stands regardless: if either environment is ever deleted, GitHub recreates it unprotected on first use and the gate silently disappears. It fails open, and no code in this repo can defend against that. |
Closes: #37136
Stack #37143, middle. Based on #37140.
What
Adds
cicd_manual_changelog-site-publish.yml, aworkflow_dispatchwrapper around the existing changelog site publish phase — the patterncicd_ai-release-notes-backfill.ymlalready uses for the notes phase.Why
The phase is
workflow_call:only and gated onsuccess(), so any upstream failure or cancellation skips it with no CI path to recover. Today that means a local checkout plus three values that otherwise never leave GitHub —DOTCMS_DEVSITE_URL,DOTCMS_DEVSITE_RELEASENOTES_TOKEN,DOTCMS_DEVSITE_RELEASENOTES_ACCOUNT.That is what 26.08.19 cost: four attempts, three shipping Docker images with no changelog, the fourth publishing a changelog covering 1 of 19 commits. Recovery needed Keeper and a local shell.
The phase's comments also describe
--forceas "a manual operator re-run only", but no manual re-run path existed — the flag was unreachable from CI.How
The wrapper derives what the pipeline would have passed:
release_versionvdocker_tagsversion_shatag so a manual entry matches a pipeline-written onereleased_datepublishedAt, so backfilling an older release does not stamp today's dateThe phase gains
forceandreleased_date, both defaulting to current behavior. The release pipeline path is unchanged —cicd_6-release.ymlsets neither input.Access control
workflow_dispatchis limited to accounts with write access — never forks, never anonymous — but that is 45 accounts today, and this writes to the public docs site with a service-account token. So the publish job sits behind a no-op approval gate on thechangelog-site-publishenvironment (required_reviewers: dotDevelopers), matchingcicd_evergreen-tracks-promote.yml's apply gate.The environment has been created with that rule. It must keep it: GitHub auto-creates a missing environment unprotected on first use, which would silently remove the gate — it fails open, not closed.
Verification
Both workflows parse as valid YAML. The resolve logic was run against a real tag and reproduces the manual publish exactly: docker tag →
26.08.19-04_a0181f9, released date →2026-08-20, both matching the entry now live on the site.Not exercised end-to-end against the live site: the only release currently needing a publish was already published by hand, and re-running would trip human-edit protection. A run on the next release that needs it is the real test.
🤖 Generated with Claude Code
https://claude.ai/code/session_01EbgDBJuoBrpJxh5qLMPorL