This is sample heading text

This is sample heading text

Agentic CI/CD Migration

Foodstuffs North Island needed over 2,000 code repositories moved off Bitbucket and Bamboo and onto standardised GitHub pipelines. In the face of an impossible manual task, RUSH built an agentic & AI-assisted workflow and toolchain that made the job achievable.

Ticket turnaround is down to around a day, roughly a fifth of comparable projects, and tranches of around 200 repositories now migrate in two to three hours. A migration of more than 2,000 repositories that stalled when done by hand is now moving for Foodstuffs North Island tranche by tranche.

Foodstuffs North Island’s CI/CD (continuous integration and continuous delivery) spanned more than 2,000 code repositories and as many Bamboo build and deployment plans. These had been built with a wide variety of tools and patterns over many years, across many squads. Infrastructure was distributed across separate repositories and tooling, including Ansible, Helm and Terraform. Earlier attempts to catalogue and migrate the estate by hand had stalled as it became clear that efforts to manually catalogue and migrate would take years to complete, if possible at all.

RUSH used AI agents to map the existing estate and design where it needed to end up. The agents also identified common migration patterns, which were written into a deterministic, schema-validated Python toolkit. The same tested toolkit runs on every repository and gets more reliable with each tranche, so no repository is solved from scratch. Ticket turnaround is down to roughly a fifth of comparable projects, around a day instead of most of a week.

Know the current state first

RUSH split the work into two separate stages, discovery and target state design, then execution. Rather than start with a small pilot set, the team built an agentic pipeline analyser. It pulled every repository and Bamboo plan into one place and interrogated each one in two layers.

Layer 1 collected fast, deterministic, file-based signals from Bitbucket and Bamboo. Layer 2 had GitHub Copilot read the actual repository content and Bamboo YAML against a structured question set. Layer 1’s findings were fed into Layer 2, so the two couldn’t contradict each other. 

Each repository ended up with a metadata record covering its languages, dependencies, pipeline shape and infrastructure requirements. The records are stored as versioned files in Git rather than a traditional database, so concurrent workflows can update them through pull requests. Whenever an LLM answer proved repeatable, it was converted into a programmatic check, making discovery faster and cheaper over time.

Design the target, then plan every repo

With the current state known, the target state was documented. It moves builds to GitHub Actions golden workflows, moves secrets off the incumbent tool onto one standardised secrets management platform, and makes infrastructure declarative. Midway through the project, the Foodstuffs architecture team switched from Terraform to Crossplane. Each service now describes the resources it needs in one file, instead of relying on separate infrastructure repos.

A plan generator agent reads each repository’s metadata, identifies the relevant migration steps and writes a per-repo migration_plan.yaml. An LLM’s first pass proposed around 1,000 candidate steps, and classification narrowed these to fewer than 40 reusable tools.

A metadata-driven migration toolkit

Four components work together: the pipeline analyser, the Git-backed metadata database, a migration toolkit with a formal tool catalogue and a runtime engine

Each tool in the catalogue has a stable ID, a JSON Schema contract and a tested Python implementation. Each tool also decides whether it’s needed for a given repository and resolves its own parameters from the metadata or the source repo. The runtime engine validates the plan, dispatches the right tools and opens a merge-ready GitHub pull request.

AI does not rewrite code to produce the migration, because LLM output was too non-deterministic and hard to audit at this scale. The plan is the boundary. Everything after it is code that behaves identically on every run. Test-driven development guardrails hold the toolkit above 92% test coverage, and no change can be committed until it passes the QA gates.

Repositories move through a phase-gated lifecycle covering readiness checks, migration, PR checks, merge and handover. They are grouped into tranches by complexity. Parallel workers on GitHub-hosted runners process eight repositories at a time, migrating a tranche of around 200 in two to three hours. Analysis runs through Foodstuffs’ enterprise Copilot with data retention switched off.

We build it, we run it, and we're still there when it needs to evolve.

Book a discovery session →