CI/CD Runway Implementation
Task-oriented recipes. Assumes you have read architecture and are following guidelines.
How to onboard a new service to Runway
Goal. New ION service needs its build/test/deploy substrate.
Steps.
- Register the service in the Service Inventory (canonical source
for
service-map.json). Include short-name, owning team, targets (Function App / ACI / Static Web App / etc.), and env list. - Ask CPE (or your platform contact) to run
runway-github-service-onboarding.ymlviaworkflow_dispatchwith your service short-name and owning team. This provisions:- GitHub team + RBAC on the service folder.
- JFrog Artifactory repos + RBAC.
- Service Entra app scaffolding (per env).
- GitHub deployment environments
<svc>-<env>.
- Request CPE whitelist the federated-credential subject pattern
for your service:
repo:Ontinue/Anvil:environment:<svc_short>-<env_long>. - Note the emitted client-id vars (
ION_ALPHA_AZURE_CLIENT_ID_<SVC>,ION_BETA_..., etc.) and put them in your workflows. - Write your three workflows (see next recipe).
- Ship a no-op change to
apato validate PR gates + WIF auth + spoke reachability. - Promote through
bta→gma→prd.
How to write the three service workflows
Goal. Stand up <service>-pr.yml, <service>.yml, and
<service>-tag.yml.
Steps — <service>-pr.yml.
- Trigger on
pull_requesttargetingmain. - Call CPE reusable workflows for required checks:
lib-validate-codeql.yml,lib-validate-tfsec.yml,lib-validate-biome-linter.yml(or the appropriate linter),validate-pr-title.yml. - Build + unit test.
- (Optional) Ephemeral Alpha ACI deploy via
lib-aci-ghpr-create.ymlfor integration tests, cleaned up bylib-aci-ghpr-delete.yml.
Steps — <service>.yml.
- Trigger on
pushtomain(path-filtered to your service folder). - Build, run tests, publish artifact via CPE reusable workflow (e.g.,
lib-docker-artifactory-deploy.yml). - Deploy to
apaenv, thenbta, thengma, each as a job withenvironment:set to<svc>-<env>. - Use
azure/login@v3withclient-id/tenant-id/subscription-id. Neverclient-secret. - Call
lib-deploy-terraform.ymlfor infra, then service-specific deploy libs (e.g.,kronos-deploy-func.yml).
Steps — <service>-tag.yml.
- Trigger on
pushtag (e.g.,v*). - Reuse the deploy job, target
<svc>-prodenvironment. - Include env-approval + custom-protection-rule gates on the prod environment.
How to add a WIF federated credential
Goal. New env or new service needs a pipeline-to-Azure federated credential.
Steps.
- Confirm the service Entra app for the target env exists
(
ion-<service>-<env>). - Add a federated credential on the app with subject
repo:Ontinue/Anvil:environment:<svc_short>-<env_long>. - Add the
CLIENT_IDas a GitHub environment variable (not secret; client-id is not sensitive). azure/login@v3in the workflow picks it up.- Verify by running a
az account showstep in a workflow scoped to the target env.
See the Identity implementation guide for underlying identity-plane details.
How to promote a deploy from Alpha through to Prod
Goal. A change is in main; walk it through envs to prod.
Steps.
- Merge PR — required checks + CODEOWNERS approvals must be green.
<service>.ymlruns on push-to-main; deploys toapafirst. Verify.- Same run continues to
bta(approval gate if configured), thengma. Verify at each stop; run integration tests as appropriate. - When ready for prod, tag the commit (
git tag v1.2.3 && git push --tags).<service>-tag.ymltriggers. - Prod environment’s native approval + custom protection rule verdict must pass.
- Deployment record captured; SOC1 evidence chain complete.
How to add a custom Environment Protection Rule
Goal. Prod (or another env) needs a programmable gate — change freeze window, upstream health check, deploy quota.
Steps.
- Author the runbook logic in an Azure Automation Account. The main runbook receives the webhook; dispatch to an env-specific runbook that evaluates the policy.
- Runbook returns Approved or Rejected (with reason).
- Configure the GitHub environment’s custom protection rule to point at the Automation Account webhook.
- Test by deploying with policy in a state that should reject; verify the pipeline blocks.
- Then deploy with policy in an approve state; verify pipeline releases.
- Ship the runbook via IaC — it’s code, not portal state.
How to publish or update a shared Terraform module
Goal. Contribute a new module or a version bump to tf-modules/.
Steps.
- Extract the reusable pattern with clear inputs/outputs and a
README.md. - PR into
tf-modules/azure/<module-name>/(orartifactory//auth0/as appropriate). - Tag with a semver PR label (
Major/minor/patch); CPE reusable workflow computes and publishes the version to Artifactory. - Migrate consumers to the new version. Publish deprecation notices for old versions.
- Removal: use PR label
deletetfmoduleand contact CPE to remove versions from Artifactory.
How to promote a Docker image through envs
Goal. A merged PR built and pushed a Docker image; you want it running in the target env.
Steps.
lib-docker-artifactory-deploy.ymlpublishes to the Alpha Artifactory repo on PR merge.lib-docker-artifactory-promote.ymlpromotes from Alpha → Beta, then Beta → Gamma, then Gamma → Prod as each env’s tests pass.lib-docker-acr-copy.ymlcopies the promoted image to the target env’s ACR at deploy time — runtime pulls stay Azure-local.- Deploy step references the ACR image URL.
How to respond to a workflow failure
Goal. A pipeline job failed; unblock the team.
Steps.
- Read the logs first. The failure message + step name are almost always sufficient.
- Determine class of failure:
- Code / test — fix the code, push again.
- Required check — resolve the finding (CodeQL / TFSEC / OSS license / secret-validation). If false-positive, document and exempt with narrow scope; do not disable the check.
- Auth / WIF — verify federated-credential subject matches the
workflow context; verify env
CLIENT_IDvalue; verify the app has RBAC on target subscription. - Network / private-endpoint — verify runner uses the correct VNet-NIC label; verify NSG / DNS.
- Env approval / custom protection rule — someone needs to approve, or a runbook is rejecting.
- Do not attempt to bypass the gate by deploying manually (§ 25).
- File follow-up tickets for anything not fixed at the moment of response.
How to audit a production deployment
Goal. Compliance / SOC1 audit needs to see the evidence chain for a specific prod deploy.
Steps.
- Locate the deployment record (GitHub Deployments API for the
<svc>-prodenvironment). - Follow the linked workflow run URL.
- From the workflow run, gather:
- The commit SHA and its PR.
- PR’s required-check results (Secret Validation, PR Label, PR Title, CodeQL, TFSEC, OSS License, Linter).
- PR’s CODEOWNERS approvals (per file).
- Env approval record (approver identity + timestamp).
- Custom protection rule verdict (runbook execution logs).
- WIF OIDC token issuance (Entra audit log entry).
- Terraform / deploy outputs.
- This chain is the SOC1 evidence surface.
How to enable JFrog X-Ray scanning + respond to findings
Goal. Automated vulnerability scanning on published artifacts.
Steps.
- X-Ray is enabled at the Artifactory-repo level by CPE; new repos inherit the policy.
- On finding,
runway-vulnerability-management.ymlopens a triage task. - Owning team responds per the SLA:
- Critical / high — patch or exempt with justification.
- Medium / low — schedule in the next sprint.
- Exemptions require an ADR-like justification captured in
runway-security-dhi-exception.yml.
Related
- architecture
- guidelines
- ADR: 0024
- Microsoft — Configure OIDC to Azure
- GitHub — About environments
- CPE refs —
CPE - GitHub - *underreferences/