Deleting the Jenkinsfile: a monorepo CI migration in four commits

The IMS repository's entire CI was nine lines of Groovy, and replacing it took one afternoon, two pull requests and a handful of reverts.

DevOps

The repository builds three images (ims, dns and mysql), and for most of 2025 its whole CI was nine lines of Groovy in a root Jenkinsfile.

@Library("infra-ci-pipelines@latest") _
monorepo {
  projects = [ "ims", "dns", "mysql" ]
}

Each service directory carried its own Jenkinsfile, a three-line Makefile, and a meta-dev.yml/meta-prod.yml pair. The shared common.mk held the registry and the only three targets any of them used (build, push, validate-metadata). None of the pipeline logic lives in the repository — the shared library owns the stages, and each directory declares two things (which directory to build, what the service is called).

Getting it to build at all

The first attempt moved the base image from ubuntu:bionic-20230126 to ubuntu:24.04 and added a four-line ciPipeline call (CW-1977, 23 January 2025). Five days later both halves of that came back out. The revert restored bionic and vendored two Kamailio source trees into the repository, behind an IMAGE_VARIANT switch with three settings (hs for the IMS fork, kamailio for upstream, ext for the fork fetched at build time). Two days after that the default moved to ext, and the vendored sources left the repository again. The commit subject records what happened — "Build from external sources with old version of ubuntu" — and never says why. That is the usual trouble with reading your own history a year later.

The gates

More of that week went into meta-dev.yml than into the build. The Kamailio tree carries its own test credentials, so the platform's secret scan failed on upstream code; allow_secret_plaintext: true went in on 28 January. allow_vulnerable_code: true followed the same day, and allow_vulnerable_image: true in April (CW-2162). Three gates opened, and none of them has closed since. That is the honest state of it. The image compiles a fork of an upstream project from source (Kamailio 5.6, an explicit include_modules list), then gets scanned as though every line were ours.

Moving to GitHub Actions

CW-3385, 11 February 2026. Three per-service workflows replaced four Jenkinsfiles and a semgrep.yml. Each one is a four-line call into a shared reusable workflow (dockerImage.yml@latest) under three triggers: push and pull_request on main, plus workflow_dispatch.

    with:
      build_dir: ims
      image_additional_tags: red

The trigger's paths: filter is the whole of the change detection. The monorepo library used to work out which project a commit had touched; GitHub now does it per workflow, before the job starts.

Four things went wrong inside that one pull request, and all of them are in its merge message. An -oci suffix was added to the three service names, then taken off again. Deploy stanzas went in for the legacy host deployment (tankers_use_deploy_role: false, plus dev and prod host_groups) and came out again — that configuration belongs in the deploy repository, not the source one. promote_to_dev was dropped along with them, and a fifth commit restored it before the branch merged.

The tag that was a string

The follow-up pull request added the development tag the obvious way, in all three workflows: image_additional_tags: '["red"]'. The reusable workflow types that input as a plain string, not a JSON array, so the quoted-array form was wrong in every one of them. The fix was four characters (red) and nothing else.

What it cost

One afternoon, four commits across two pull requests (#44 and #45), and a repository with no Jenkinsfile left in it. The last of the four set promote_to_prod: mode: "always" on all three services. What reaches production is now the digest that passed in development — promoted, never rebuilt.