Problem Statement: Two Toolchains, One Trust Boundary
Frames mobile CI as a dual-toolchain build-and-sign system, not a generic web pipeline.
Problem statement
Design a continuous integration platform that builds, tests, signs, and distributes a cross-platform mobile application for both iOS and Android on every commit. The pipeline must compile Xcode and Gradle projects in parallel, run unit and UI test suites, execute code signing with protected credentials, package store-ready artifacts, and publish them to TestFlight, internal beta channels, and eventually store release tracks. It must serve roughly a hundred-plus engineers shipping from a shared trunk, survive node failures mid-build, and keep signing keys uncompromised even if a build container is fully compromised.
Mobile CI is not a scaled-up web pipeline. A web build produces a container image and pushes it; a mobile build produces a cryptographically signed binary that must pass a vendor's validation chain before a single tester can install it. iOS additionally forces a hardware constraint: compilation and packaging require macOS and Xcode, licensed under Apple terms, which means the fleet contains two fundamentally different worker classes — Linux containers for Android and macOS hosts for iOS — with different cost curves, different cache mechanics, and different failure modes.
Why this problem is distinctive
First, the signing chain is a hard security boundary. An iOS build is worthless without a valid signing identity plus a matching provisioning profile that authorizes that bundle ID on those device classes; Android requires a keystore whose loss or leak is equally catastrophic. The CI system therefore becomes the custodian of the organization's most sensitive release credentials, and every build container is a potential attacker standing next to them.
Second, feedback latency is the product. Engineers do not wait for CI; they context-switch away and lose the change. Every minute of queue plus build plus test time compounds across hundreds of daily pull requests. The design must treat p50 feedback time as a first-class SLO with its own budget arithmetic, not an afterthought.
Third, the test surface is physical. Unit tests run on JVMs and simulators, but meaningful confidence requires UI tests on real devices — hundreds of OS and hardware combinations that must be scheduled, sanitized between tenants, and recycled. The device farm is a scarce physical resource with queueing dynamics that no amount of cloud autoscaling can instantly absorb.
The four architectural planes
- Control plane: pipeline definitions, DAG orchestration, triggers, retries, admission.
- Execution plane: macOS and Linux workers, remote build caches, test sharding, device fleets.
- Trust plane: signing vault, artifact attestation, provenance, store submission.
- Insight plane: metrics, test analytics, flake detection, cost attribution.
A strong answer keeps these planes separate. A compromised execution-plane container must not escalate into trust-plane authority, and insight-plane analytics must never block the execution path.
Key Highlights
- •Mobile CI's core product is fast, trustworthy verdicts plus signed artifacts, not raw compute.
- •iOS imposes a macOS-only hardware constraint; the worker fleet is inherently heterogeneous.
- •The signing vault is the system's highest-value asset and must be isolated from build containers.
- •Feedback latency is an SLO with explicit budget arithmetic, not a vague goal.
- •Four planes: control, execution, trust, insight — with one-way authority between them.
Section Rescue Kit
Buzzwords to use:
Safe statements:
- "I will separate build speed from signing trust: the first may be aggressively parallelized, the second must stay centralized and audited."
- "Before choosing tools, let me define which plane owns each decision and what happens when a worker is compromised."