Add a service to CI
Add a service to CI when a change adds a new deployable part, image or test suite. Extend the pipeline at the ownership boundary that changed. Do not copy an existing job wholesale.
- Add the service's paths to
detect-changesincicd.yml, including the shared files that can affect it. Expose the result as a reusable-workflow input. - Add purpose-named jobs to
ci-quality-gates.yml,ci-tests.ymlorci-build.yml. Declareneedsonly when a job consumes another job's artifact. Give every runnable job least-privilege permissions and a timeout of at least 15 minutes. - Use
setup-toolchainwith an explicit install mode. Usefrozenfor any job that callsvp, because Vite+ loads the task graph from workspace configs.noneonly for jobs that runnode scripts/…or shell alone. Java jobs use a validatedsetup-cachestype. Browser jobs usesetup-browsers. - Add a Dockerfile image as a target of
docker/docker-bake.hcland an input ofreusable-docker-build.yml. Keep image metadata, immutable tags, attestations, and signing in that workflow rather than reproducing them in the caller. In that workflow, also add the image to:IMAGE_NAMES, the one list that the image selection and every name check read, and a boolean input of the same name.- A metadata step, its
bake-file-labelsentry, and the image list of the merge job's metadata step. - A digest output and an
Attest the <image> imagestep. imageAttestationsinscripts/resolve-server-build.ts, so that a push can reuse the image.- Its
*_changedinput inci-docker-build.ymlandsecurity/release-images.json.
- Pass the change-detection output from
cicd.ymlto every reusable workflow that needs it.
Check that it worked
- Run
node scripts/check-workflows.ts. It reports no error. - Run
node --test scripts/ci-contract.test.ts. Every test passes. This test owns the workflow invariants. If the service adds an invariant, add a test for it first. - Open a pull request that changes the service's paths. The new jobs run, and a pull request that does not change them skips them.