Skip to content

refactor(gitlab)!: the Op pipeline's stage and file are named "ops", not "scheduled-ops" (#2293) - #2295

Merged
lex00 merged 1 commit into
mainfrom
feat/2293-gitlab-ops-stage-name
Sep 9, 2026
Merged

lex00 merged 1 commit into
mainfrom
feat/2293-gitlab-ops-stage-name

Conversation

@lex00

@lex00 lex00 commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Closes #2293. Part of epic #2289.

STAGE = "scheduled-ops" in the gitlab Op generator dated from when it was
cron-only. Since #2268 the same file also carries merge-request and push jobs,
so a GitLab UI grouped live-check, live-plan, live-apply and live-adopt under a
stage called "scheduled-ops", and a consuming project's include: named a file
that said the opposite of what it held.

Default is now "ops" for both the stage and the file's base name
(ops.gitlab-ci.yml), overridable via two new ComponentPipelineOptions fields
plumbed the same way as every other generator knob:

  • opsStage renames the stage, and by default the file with it
  • opsFileName renames the file independently

Both refuse a blank value. The GitHub and Forgejo Op generators ignore them, since
they emit one file per Op with no shared stage. The generated file's header now
names the stage, so it is readable from the YAML alone.

Proof

Tests written first, then the two source files stashed and the suite run against the
unmodified generator: 10 failures, the mixed-trigger one being

AssertionError: expected 'scheduled-ops.gitlab-ci.yml' not to match /scheduled/
- Expected:
/scheduled/
+ Received:
"scheduled-ops.gitlab-ci.yml"

Stash popped, all 38 tests in that file green.

Regenerated the consuming project in a scratch copy against these packages. Its
GitLab output moves from scheduled-ops.gitlab-ci.yml to ops.gitlab-ci.yml,
stages: reads ops, and all five jobs move to stage: ops. generate.ts needs
no change, since it already writes whatever the result names.

Verdicts

  • just build (tsc --noEmit, core + repo) clean
  • just lint 2 pre-existing warnings in an unrelated file, none in the three changed files
  • just test Test Files 1206 passed, 5 skipped; Tests 16940 passed, 39 skipped
  • just check-lexicons gitlab 23/23 tier-1 checks passing, no untracked tier-1 failures

BREAKING CHANGE: renames every consuming project's generated GitLab file and its
include: line. INTENTIUS/choudoufu's examples/ci-pipelines needs
gitlab/ops.gitlab-ci.yml, the README's include: line and
tests/pipelines.test.ts's GITLAB_FILE constant updated. Tracked at
INTENTIUS/choudoufu#1018.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KCvXZWJq4nrMCBRe98TX1v

…not "scheduled-ops" (#2293)

`STAGE = "scheduled-ops"` in the gitlab Op generator dates from when it was
cron-only. Since #2268 the same file also carries merge-request and push
jobs (live-check/live-plan/live-apply/live-adopt on this project), so a
GitLab UI grouped all of them under a stage called "scheduled-ops" and a
consuming project's `include:` named a file (`scheduled-ops.gitlab-ci.yml`)
whose name said the opposite of what it held.

The default is now `"ops"`: the stage every generated job runs in (`stages:`
and each job's `stage:`), and the base of the generated file's name
(`ops.gitlab-ci.yml`). Both are overridable through the same
`ComponentPipelineOptions` every other generator knob (`image`, `variables`,
`beforeScript`, ...) already goes through — `opsStage` renames both by
default, `opsFileName` renames the file independently when a caller wants
the two to differ. GitHub- and Forgejo-only: those generators emit one
workflow file per Op with no shared stage, so the two options do nothing
there. The generated file's own header now names the stage
(`one job per Op under stage "ops"`), so a reader of the YAML alone can see
where "ops" comes from.

BREAKING: this renames every consuming project's generated GitLab file and
`include:` line. `INTENTIUS/choudoufu`'s `examples/ci-pipelines` regenerates
gitlab/ops.gitlab-ci.yml in place of gitlab/scheduled-ops.gitlab-ci.yml;
its README's `include: - local: 'scheduled-ops.gitlab-ci.yml'` and
tests/pipelines.test.ts's GITLAB_FILE constant need the same rename, tracked
at INTENTIUS/choudoufu#1018. `generate.ts` itself needs no change: it writes
whatever `result.files` names.

Part of #2289. Refs #2268, #2256, #2257, #2243, #2242, #2231.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KCvXZWJq4nrMCBRe98TX1v
@lex00
lex00 merged commit 7375e52 into main Sep 9, 2026
5 checks passed
@lex00
lex00 deleted the feat/2293-gitlab-ops-stage-name branch September 9, 2026 05:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gitlab Op generator: the stage and file are still named scheduled-ops, and now carry merge-request and push jobs

1 participant