Skip to content

[REFERENCE ONLY] feat(migrate): full CI migration — all 7 systems (split into stacked PRs)#217

Closed
Viktor (tiulpin) wants to merge 1 commit into
mainfrom
worktree-abstract-frolicking-thimble
Closed

[REFERENCE ONLY] feat(migrate): full CI migration — all 7 systems (split into stacked PRs)#217
Viktor (tiulpin) wants to merge 1 commit into
mainfrom
worktree-abstract-frolicking-thimble

Conversation

@tiulpin

@tiulpin Viktor (tiulpin) commented Apr 9, 2026

Copy link
Copy Markdown
Member

Warning

This PR is reference-only — do not merge. It grew too large for a single review pass. The work has been split into focused PRs starting with #226.

Why this PR is no longer active

The original scope (foundation + 7 CI converters + skill + issue template) landed at ~7.3k insertions across 42 files, which is too much to review in one shot. The code is sound and has been through multiple rounds of Codex review and bug fixes, but it needs to land in digestible slices.

Split plan

Each follow-up PR is an independent, self-contained slice against `main`. They'll land sequentially (not stacked) so each can be reviewed against the previous merged state.

# PR Scope Tier
1 #226 Foundation + GitHub Actions (open) — shared plumbing, GHA converter, skill docs (GHA sections), issue template 1
2 pending GitLab CI — `gitlab.go`, fixture, skill GitLab sections 1
3 pending Jenkins via API — `jenkins.go`, AST, skill Jenkins sections 1
4 pending CircleCI — `circleci.go`, orb expansions, skill sections 2
5 pending Azure DevOps — `azure.go`, task mappings, skill sections 2
6 pending Bitbucket Pipelines — `bitbucket.go`, pipe mappings, skill sections 2
7 pending Travis CI — `travis.go`, language defaults, skill sections 3

Priority / tier rationale (based on JetBrains 2024 Developer Ecosystem survey × our code investment × strategic value for TeamCity): GHA + Jenkins + GitLab together cover ~89% of real-world CI usage.

What this branch still contains

The full 7-system implementation, already refined through:

  • Multiple rounds of Codex automated review (Jenkins `post` on parallel/nested stages, `${env.*}` ordering, CircleCI executor env merge, CircleCI invocation param threading, GitLab include deep-merge + slash-prefix paths, GitHub subpath lookup, duplicate job IDs, Bitbucket stage sequential execution, etc.)
  • Lint cleanup (`gofmt`, `golangci-lint` clean)
  • Modern Go (Go 1.26 — `cmp.Or`, `strings.NewReplacer`, `slices.SortFunc`, `strings.SplitSeq`, `maps.Copy`)
  • Honest output: "⚠ Partial conversion" instead of blanket "✓ Valid YAML"
  • Bundled `migrate-to-teamcity` skill
  • Dedicated issue template at https://jb.gg/tc/migrate/issues

Follow-up PRs will cherry-pick each CI's code from this branch and add it on top of the foundation.

Next step

Review and merge #226. Once it lands, PR #2 (GitLab) will be cut off fresh `main` using this branch as the source material.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

@tiulpin Viktor (tiulpin) marked this pull request as draft April 9, 2026 10:05
@tiulpin Viktor (tiulpin) force-pushed the worktree-abstract-frolicking-thimble branch 4 times, most recently from 42e7c81 to 91a61ac Compare April 9, 2026 11:27
@tiulpin Viktor (tiulpin) marked this pull request as ready for review April 9, 2026 11:27
chatgpt-codex-connector[bot]

This comment was marked as resolved.

@tiulpin Viktor (tiulpin) force-pushed the worktree-abstract-frolicking-thimble branch 2 times, most recently from 54e2b15 to 0cdf2a3 Compare April 9, 2026 12:38
chatgpt-codex-connector[bot]

This comment was marked as resolved.

@tiulpin Viktor (tiulpin) force-pushed the worktree-abstract-frolicking-thimble branch 4 times, most recently from f1ba219 to 822797b Compare April 9, 2026 12:49
chatgpt-codex-connector[bot]

This comment was marked as resolved.

@tiulpin Viktor (tiulpin) force-pushed the worktree-abstract-frolicking-thimble branch from 822797b to 8dca7af Compare April 9, 2026 14:01
chatgpt-codex-connector[bot]

This comment was marked as resolved.

@tiulpin Viktor (tiulpin) force-pushed the worktree-abstract-frolicking-thimble branch from 8dca7af to 535f44a Compare April 9, 2026 14:22
chatgpt-codex-connector[bot]

This comment was marked as resolved.

@tiulpin Viktor (tiulpin) force-pushed the worktree-abstract-frolicking-thimble branch 3 times, most recently from fb9d663 to 78fdeea Compare April 9, 2026 14:34
chatgpt-codex-connector[bot]

This comment was marked as resolved.

@tiulpin Viktor (tiulpin) force-pushed the worktree-abstract-frolicking-thimble branch 2 times, most recently from fd684b2 to 18fd8fa Compare April 9, 2026 14:42
chatgpt-codex-connector[bot]

This comment was marked as resolved.

@tiulpin Viktor (tiulpin) force-pushed the worktree-abstract-frolicking-thimble branch 3 times, most recently from 0da3538 to ad00b62 Compare April 9, 2026 15:15
chatgpt-codex-connector[bot]

This comment was marked as resolved.

@tiulpin Viktor (tiulpin) force-pushed the worktree-abstract-frolicking-thimble branch from 0e45bed to 8753f2d Compare April 10, 2026 16:31
chatgpt-codex-connector[bot]

This comment was marked as resolved.

@tiulpin Viktor (tiulpin) force-pushed the worktree-abstract-frolicking-thimble branch 2 times, most recently from 087bfdf to aa7d148 Compare April 11, 2026 13:26
chatgpt-codex-connector[bot]

This comment was marked as resolved.

@tiulpin Viktor (tiulpin) force-pushed the worktree-abstract-frolicking-thimble branch from aa7d148 to 03783e4 Compare April 11, 2026 14:02
chatgpt-codex-connector[bot]

This comment was marked as resolved.

@tiulpin Viktor (tiulpin) force-pushed the worktree-abstract-frolicking-thimble branch 2 times, most recently from 6dad42c to 09175ae Compare April 11, 2026 15:32
@tiulpin Viktor (tiulpin) changed the title feat(migrate): add CI migration command and skill feat(migrate): add CI migration command with Jenkins API, 7 CI systems, 60+ action transformers Apr 11, 2026
chatgpt-codex-connector[bot]

This comment was marked as resolved.

@tiulpin Viktor (tiulpin) force-pushed the worktree-abstract-frolicking-thimble branch from 09175ae to 7c9566d Compare April 11, 2026 15:38
@tiulpin Viktor (tiulpin) changed the title feat(migrate): add CI migration command with Jenkins API, 7 CI systems, 60+ action transformers feat(migrate): add CI migration command with Jenkins API, 7 CI systems, 80+ action transformers Apr 11, 2026
@tiulpin Viktor (tiulpin) force-pushed the worktree-abstract-frolicking-thimble branch from 7c9566d to de7c151 Compare April 11, 2026 15:40
chatgpt-codex-connector[bot]

This comment was marked as resolved.

@tiulpin Viktor (tiulpin) force-pushed the worktree-abstract-frolicking-thimble branch from de7c151 to 30981e0 Compare April 11, 2026 22:06
chatgpt-codex-connector[bot]

This comment was marked as resolved.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 58b7b038e9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "Codex (@codex) review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".

Comment thread internal/migrate/github.go Outdated
Comment thread internal/migrate/azure.go Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5660d2d40f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "Codex (@codex) review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".

Comment thread internal/migrate/azure.go
Comment on lines +198 to +199
taskSteps, taskCache := convertAzureTask(taskRef, step, stepName, result, opts)
j.Steps = append(j.Steps, taskSteps...)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve step env when converting Azure task steps

buildAzureJob extracts stepEnv for every Azure step, but in the task branch it appends taskSteps directly without attaching those environment variables. This drops env: for common task forms like Bash@3/CmdLine@2/PowerShell@2, so migrated scripts can run without required tokens/flags and fail at runtime even though the source pipeline works.

Useful? React with 👍 / 👎.

Comment on lines +240 to +241
if run, ok := v["run"].(string); ok {
return []Step{{ScriptContent: mapCircleCIVars(run)}}, false

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Apply CircleCI parameter substitution to run shorthand

The shorthand run path maps variables but skips substituteCircleParams, so commands written as - run: "echo << parameters.msg >>" keep raw << parameters.* >> placeholders in generated script-content. In parameterized jobs this produces invalid commands after migration; this branch should substitute invocation/job params the same way as the map-form run.command path.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: db5c3b0117

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "Codex (@codex) review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".

Comment on lines +52 to +55
if jobsMap, ok := doc["jobs"].(map[string]any); ok {
if includes, ok := jobsMap["include"].([]any); ok && len(includes) > 0 {
return convertTravisJobMatrix(doc, includes, result)
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep default Travis jobs when include entries are present

This early return converts only jobs.include/matrix.include entries and skips the base Travis job matrix derived from top-level keys (for example language + node_js/go versions). In common configs where include adds deploy/lint jobs on top of normal build/test jobs, the generated TeamCity pipeline silently drops the primary jobs and can run only the extras.

Useful? React with 👍 / 👎.

Comment on lines +157 to +160
steps, ok := job["steps"].([]any)
if !ok {
continue
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Emit CircleCI jobs even when steps is omitted

Jobs are skipped entirely when job["steps"] is absent, which drops valid workflow nodes such as type: no-op jobs (or other non-step templates) and leaves downstream dependencies pointing at jobs that were never emitted. This can produce broken execution graphs after migration even though the source CircleCI workflow is valid.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7826181b7d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "Codex (@codex) review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".

Comment on lines +149 to +152
if image, ok := doc["image"].(string); ok {
globalImage = image
} else if imgMap, ok := doc["image"].(map[string]any); ok {
if name, ok := imgMap["name"].(string); ok {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Handle GitLab default.image inheritance

The converter only reads doc["image"] for the global runtime image and never inspects default.image, so pipelines that set a shared image under default are migrated without any Docker-image manual setup hint. In those repos, converted jobs can run on agents missing required tooling because the inherited container context is silently dropped.

Useful? React with 👍 / 👎.

Comment on lines +143 to +145
if services, ok := doc["services"].([]any); ok && len(services) > 0 {
result.ManualSetup = append(result.ManualSetup,
fmt.Sprintf("Global services %v → configure as Docker Compose or agent-level services", extractGitLabServiceNames(services)))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Account for GitLab default.services

Global service detection only checks top-level services, so default.services is ignored. When a GitLab pipeline defines shared services (e.g., Postgres/Redis) in default, the migration omits the corresponding manual setup guidance and generated jobs run without those service containers, which can break otherwise-valid test/deploy stages.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge Reference-only; do not merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant