Skip to content

Data, reliability, and platform · T41–T53 ​

Encyclopedia home · Search machine-readable catalog

Each code block is a complete workflow file for the stated platform. App code, provisioned resources, and tools listed as prerequisites are supplied by the consuming repository or lab. Privileged templates are manual and use trusted, dedicated runners and reviewed target environments.

T41 ​

Zero-downtime database migration

  • Platform GitHub Actions.
  • File .github/workflows/t41-zero-downtime-database-migration.yml.
  • Prerequisites previous app fixture, disposable DATABASE_URL and expand-only Alembic migration with compatibility tests.
  • Execution delivery.
  • Validation syntax-validated. External tools and provider controls require validation in your lab.
yaml
name: Zero-downtime database migration
on:
  workflow_dispatch: {}
jobs:
  delivery:
    runs-on:
    - self-hosted
    - linux
    - platform-lab
    timeout-minutes: 20
    defaults:
      run:
        shell: bash
    if: github.ref == 'refs/heads/main'
    environment: staging
    steps:
    - uses: actions/checkout@v4
      with:
        persist-credentials: false
        fetch-depth: 0
    - name: Preflight
      run: |-
        alembic heads
    - name: Execute
      run: |-
        pytest -q tests/db-compat
        alembic upgrade head
        pytest -q tests/db-compat
    - name: Verify result
      run: |-
        alembic current --check-heads
permissions:
  contents: read
concurrency:
  group: t41-reviewed-delivery
  cancel-in-progress: false

Verification and failure handling. Run the old app against the expanded schema. Separate backfill and contract with independent promotion.

Related CICD-315 · CICD-318 · CICD-320 · Workflow reference

T42 ​

Database backup and recovery

  • Platform GitHub Actions.
  • File .github/workflows/t42-database-backup-and-recovery.yml.
  • Prerequisites test DATABASE_URL, a different disposable RESTORE_URL, rights to dump/restore, invariant SQL.
  • Execution delivery.
  • Validation syntax-validated. External tools and provider controls require validation in your lab.
yaml
name: Database backup and recovery
on:
  workflow_dispatch: {}
jobs:
  delivery:
    runs-on:
    - self-hosted
    - linux
    - platform-lab
    timeout-minutes: 20
    defaults:
      run:
        shell: bash
    if: github.ref == 'refs/heads/main'
    environment: staging
    env:
      DATABASE_URL: ${{ secrets.DATABASE_URL }}
      RESTORE_URL: ${{ secrets.RESTORE_URL }}
    steps:
    - uses: actions/checkout@v4
      with:
        persist-credentials: false
        fetch-depth: 0
    - name: Preflight
      run: |-
        test -s tests/restore-checks.sql
    - name: Execute
      run: |-
        test "${DATABASE_URL:?}" != "${RESTORE_URL:?}"
        umask 077
        pg_dump --format=custom --file=backup.dump "$DATABASE_URL"
        pg_restore --exit-on-error --single-transaction --no-owner --no-privileges --dbname="$RESTORE_URL" backup.dump
    - name: Verify result
      run: |-
        psql "$RESTORE_URL" -X -v ON_ERROR_STOP=1 -f tests/restore-checks.sql
permissions:
  contents: read
concurrency:
  group: t42-reviewed-delivery
  cancel-in-progress: false

Verification and failure handling. Never publish backup bytes in CI logs or general artifacts. Verify restore destination through owner-approved inventory.

Related CICD-312 · CICD-313 · CICD-350 · Workflow reference

T43 ​

Microservices contract testing

  • Platform GitHub Actions.
  • File .github/workflows/t43-microservices-contract-testing.yml.
  • Prerequisites consumer and provider contract directories, pinned test toolchain and local fixtures.
  • Execution verify.
  • Validation syntax-validated. External tools and provider controls require validation in your lab.
yaml
name: Microservices contract testing
on:
- push
- pull_request
jobs:
  verify:
    runs-on: ubuntu-latest
    timeout-minutes: 20
    defaults:
      run:
        shell: bash
    steps:
    - uses: actions/checkout@v4
      with:
        persist-credentials: false
        fetch-depth: 0
    - uses: astral-sh/setup-uv@v6
      with:
        version: 0.8.22
    - name: Preflight
      run: |-
        test -d tests/contracts/consumer
        test -d tests/contracts/provider
    - name: Execute
      run: |-
        uv sync --locked
        uv run --locked pytest -q tests/contracts/consumer
    - name: Verify result
      run: |-
        uv run --locked pytest -q tests/contracts/provider
permissions:
  contents: read

Verification and failure handling. Use the consumer-generated contract bytes in provider verification. Let mismatch block promotion.

Related CICD-329 · CICD-330 · Workflow reference

T44 ​

Distributed systems integration testing

  • Platform GitHub Actions.
  • File .github/workflows/t44-distributed-systems-integration-testing.yml.
  • Prerequisites pinned Compose fixture with RabbitMQ and Redis healthchecks and approved isolated runner.
  • Execution delivery.
  • Validation syntax-validated. External tools and provider controls require validation in your lab.
yaml
name: Distributed systems integration testing
on:
  workflow_dispatch: {}
jobs:
  delivery:
    runs-on:
    - self-hosted
    - linux
    - platform-lab
    timeout-minutes: 20
    defaults:
      run:
        shell: bash
    steps:
    - uses: actions/checkout@v4
      with:
        persist-credentials: false
        fetch-depth: 0
    - name: Preflight
      run: |-
        docker compose config --quiet
    - name: Execute
      run: |-
        export COMPOSE_PROJECT_NAME="ci-${GITHUB_RUN_ID:?}-${GITHUB_RUN_ATTEMPT:?}"
        trap 'docker compose down -v --remove-orphans' EXIT
        docker compose up -d --wait rabbitmq redis
        pytest -q tests/integration
    - name: Verify result
      run: |-
        echo 'integration resources cleaned'
permissions:
  contents: read

Verification and failure handling. Verify redelivery/idempotency using synthetic messages. Keep evidence of test outcomes.

Related CICD-338 · CICD-340 · CICD-341 · Workflow reference

T45 ​

Chaos engineering pipeline

  • Platform GitHub Actions.
  • File .github/workflows/t45-chaos-engineering-pipeline.yml.
  • Prerequisites isolated chaos-lab cluster only, kubectl scoped to lab, deployment web and health fixture.
  • Execution delivery.
  • Validation syntax-validated. External tools and provider controls require validation in your lab.
yaml
name: Chaos engineering pipeline
on:
  workflow_dispatch: {}
jobs:
  delivery:
    runs-on:
    - self-hosted
    - linux
    - platform-lab
    timeout-minutes: 20
    defaults:
      run:
        shell: bash
    if: github.ref == 'refs/heads/main'
    environment: staging
    env:
      HEALTH_URL: ${{ vars.HEALTH_URL }}
      LAB_CONTEXT: ${{ vars.LAB_CONTEXT }}
    steps:
    - uses: actions/checkout@v4
      with:
        persist-credentials: false
        fetch-depth: 0
    - name: Preflight
      run: |-
        test "$(kubectl config current-context)" = "${LAB_CONTEXT:?}"
    - name: Execute
      run: |-
        curl -fsS --max-time 6 "${HEALTH_URL:?}"
        pod=$(kubectl -n chaos-lab get pod -l app=web -o jsonpath='{.items[0].metadata.name}')
        kubectl -n chaos-lab delete pod "$pod" --wait=false
        kubectl -n chaos-lab rollout status deployment/web --timeout=120s
    - name: Verify result
      run: |-
        curl -fsS --max-time 6 "$HEALTH_URL"
permissions:
  contents: read
concurrency:
  group: t45-reviewed-delivery
  cancel-in-progress: false

Verification and failure handling. Collect continuous probe data when measuring disruption. Never run against production or an unidentified context.

Related CICD-346 · CICD-347 · CICD-348 · Workflow reference

T46 ​

Observability configuration delivery

  • Platform GitHub Actions.
  • File .github/workflows/t46-observability-configuration-delivery.yml.
  • Prerequisites pinned promtool, Loki and otelcol-contrib versions and lab config dry-run fixtures.
  • Execution delivery.
  • Validation syntax-validated. External tools and provider controls require validation in your lab.
yaml
name: Observability configuration delivery
on:
  workflow_dispatch: {}
jobs:
  delivery:
    runs-on:
    - self-hosted
    - linux
    - platform-lab
    timeout-minutes: 20
    defaults:
      run:
        shell: bash
    steps:
    - uses: actions/checkout@v4
      with:
        persist-credentials: false
        fetch-depth: 0
    - name: Preflight
      run: |-
        test -s monitoring/prometheus.yml
    - name: Execute
      run: |-
        promtool check config monitoring/prometheus.yml
        promtool test rules monitoring/rule-tests.yml
    - name: Verify result
      run: |-
        loki -config.file=monitoring/loki.yaml -verify-config=true
        otelcol-contrib validate --config=monitoring/otel-collector.yaml
permissions:
  contents: read

Verification and failure handling. All artifacts validate before config is delivered through GitOps.

Related CICD-351 · CICD-352 · CICD-355 · CICD-356 · Workflow reference

T47 ​

SLO-governed deployment

  • Platform GitHub Actions.
  • File .github/workflows/t47-slo-governed-deployment.yml.
  • Prerequisites SLO query, protected staging identity and digest-pinned candidate.
  • Execution delivery.
  • Validation syntax-validated. External tools and provider controls require validation in your lab.
yaml
name: SLO-governed deployment
on:
  workflow_dispatch: {}
jobs:
  delivery:
    runs-on:
    - self-hosted
    - linux
    - platform-lab
    timeout-minutes: 20
    defaults:
      run:
        shell: bash
    if: github.ref == 'refs/heads/main'
    environment: staging
    env:
      HEALTH_URL: ${{ vars.HEALTH_URL }}
      IMAGE: ${{ vars.IMAGE }}
      PROM_URL: ${{ vars.PROM_URL }}
    steps:
    - uses: actions/checkout@v4
      with:
        persist-credentials: false
        fetch-depth: 0
    - name: Preflight
      run: |-
        command -v jq
        command -v kubectl
    - name: Execute
      run: |-
        curl -fsSG "${PROM_URL:?}/api/v1/query" --data-urlencode 'query=slo:burn_rate_1h{service="web"}' | jq -e '.data.result | length==1 and (.[0].value[1]|tonumber)<=2'
        [[ "${IMAGE:?}" =~ @sha256:[0-9a-f]{64}$ ]]
        kubectl -n staging set image deploy/web web="$IMAGE"
        kubectl -n staging rollout status deploy/web --timeout=180s
    - name: Verify result
      run: |-
        curl -fsS --max-time 8 "${HEALTH_URL:?}" | jq -e '.status=="ok"'
permissions:
  contents: read
concurrency:
  group: t47-reviewed-delivery
  cancel-in-progress: false

Verification and failure handling. Missing samples fail closed. Review the query window and gate limits with the SLO owner.

Related CICD-359 · CICD-360 · Workflow reference

T48 ​

Compliance-enforced software delivery

  • Platform GitHub Actions.
  • File .github/workflows/t48-compliance-enforced-software-delivery.yml.
  • Prerequisites stored Conftest policies, policy tests and reviewed cloud manifest fixture.
  • Execution delivery.
  • Validation syntax-validated. External tools and provider controls require validation in your lab.
yaml
name: Compliance-enforced software delivery
on:
  workflow_dispatch: {}
jobs:
  delivery:
    runs-on:
    - self-hosted
    - linux
    - platform-lab
    timeout-minutes: 20
    defaults:
      run:
        shell: bash
    steps:
    - uses: actions/checkout@v4
      with:
        persist-credentials: false
        fetch-depth: 0
    - name: Preflight
      run: |-
        test -d policy/kubernetes
    - name: Execute
      run: |-
        conftest verify --policy policy/kubernetes
        conftest test manifests/*.yaml --policy policy/kubernetes --output json > policy-report.json
    - name: Verify result
      run: |-
        jq -e 'length > 0' policy-report.json
        sha256sum policy-report.json
    - uses: actions/upload-artifact@v4
      with:
        name: t48-evidence
        path: policy-report.json
        retention-days: 7
        if-no-files-found: error
permissions:
  contents: read

Verification and failure handling. Known-bad fixture must be rejected by policy tests. Keep audit evidence alongside immutable manifests.

Related CICD-244 · CICD-369 · CICD-380 · Workflow reference

T49 ​

Signed and attested software supply chain

  • Platform GitHub Actions.
  • File .github/workflows/t49-signed-and-attested-software-supply-chain.yml.
  • Prerequisites trusted GitHub-hosted runner, supported attestation plan, files under app/.
  • Execution delivery.
  • Validation syntax-validated. External tools and provider controls require validation in your lab.
yaml
name: Signed and attested software supply chain
on:
  workflow_dispatch: {}
jobs:
  delivery:
    runs-on: ubuntu-latest
    timeout-minutes: 20
    defaults:
      run:
        shell: bash
    permissions:
      contents: read
      id-token: write
      attestations: write
    if: github.ref == 'refs/heads/main'
    environment: release
    steps:
    - uses: actions/checkout@v4
      with:
        persist-credentials: false
        fetch-depth: 0
    - name: Preflight
      run: |-
        test -d app
    - name: Execute
      run: |-
        tar -czf release.tgz app
        sha256sum release.tgz > SHA256SUMS
    - name: Verify result
      run: |-
        sha256sum --strict --check SHA256SUMS
    - uses: actions/attest-build-provenance@v2
      with:
        subject-path: release.tgz
    - uses: actions/upload-artifact@v4
      with:
        name: t49-evidence
        path: |-
          release.tgz
          SHA256SUMS
        retention-days: 7
        if-no-files-found: error
permissions:
  contents: read
concurrency:
  group: t49-reviewed-delivery
  cancel-in-progress: false

Verification and failure handling. Attest after verifying bytes. In a separate deployment workflow use CICD-377 to verify trusted repository and signer identity.

Related CICD-376 · CICD-377 · Workflow reference

T50 ​

Large-scale monorepo CI

  • Platform GitHub Actions.
  • File .github/workflows/t50-large-scale-monorepo-ci.yml.
  • Prerequisites package lock, Node/pnpm and Nx project graph, base reference origin/main.
  • Execution delivery.
  • Validation syntax-validated. External tools and provider controls require validation in your lab.
yaml
name: Large-scale monorepo CI
on:
  workflow_dispatch: {}
jobs:
  delivery:
    runs-on:
    - self-hosted
    - linux
    - platform-lab
    timeout-minutes: 20
    defaults:
      run:
        shell: bash
    steps:
    - uses: actions/checkout@v4
      with:
        persist-credentials: false
        fetch-depth: 0
    - name: Preflight
      run: |-
        test -s pnpm-lock.yaml
    - name: Execute
      run: |-
        pnpm install --frozen-lockfile
        base=$(git merge-base origin/main HEAD)
        pnpm exec nx affected -t lint test --base="$base" --head=HEAD
    - name: Verify result
      run: |-
        pnpm exec nx affected -t build --base="$(git merge-base origin/main HEAD)" --head=HEAD
permissions:
  contents: read

Verification and failure handling. Running on a candidate ref should include downstream dependents. Review main-base behavior for this manual template.

Related CICD-381 · CICD-383 · CICD-395 · Workflow reference

T51 ​

Pull request preview environments

  • Platform GitHub Actions.
  • File .github/workflows/t51-pull-request-preview-environments.yml.
  • Prerequisites trusted controller sets numeric PREVIEW_PR and digest, Helm chart and scoped preview namespace provisioner.
  • Execution delivery.
  • Validation syntax-validated. External tools and provider controls require validation in your lab.
yaml
name: Pull request preview environments
on:
  workflow_dispatch: {}
jobs:
  delivery:
    runs-on:
    - self-hosted
    - linux
    - platform-lab
    timeout-minutes: 20
    defaults:
      run:
        shell: bash
    if: github.ref == 'refs/heads/main'
    environment: staging
    env:
      IMAGE: ${{ vars.IMAGE }}
      PREVIEW_PR: ${{ vars.PREVIEW_PR }}
    steps:
    - uses: actions/checkout@v4
      with:
        persist-credentials: false
        fetch-depth: 0
    - name: Preflight
      run: |-
        helm lint ./helm/web
    - name: Execute
      run: |-
        [[ "${PREVIEW_PR:?}" =~ ^[0-9]+$ ]]
        kubectl create ns "preview-$PREVIEW_PR" --dry-run=client -o yaml | kubectl apply -f -
        kubectl label ns "preview-$PREVIEW_PR" managed-by=preview --overwrite
        helm upgrade --install web ./helm/web -n "preview-$PREVIEW_PR" --atomic --set-string "image.ref=${IMAGE:?}"
    - name: Verify result
      run: |-
        helm test web -n "preview-$PREVIEW_PR" --timeout 120s
permissions:
  contents: read
concurrency:
  group: t51-reviewed-delivery
  cancel-in-progress: false

Verification and failure handling. Resolve trusted PR metadata in the controller. Pair with CICD-404 and CICD-405 for teardown and expiry.

Related CICD-276 · CICD-396 · CICD-404 · CICD-405 · Workflow reference

T52 ​

Internal developer platform golden path

  • Platform GitHub Actions.
  • File .github/workflows/t52-internal-developer-platform-golden-path.yml.
  • Prerequisites Backstage catalog-info.yaml, CODEOWNERS and Python service fixture generated from trusted template.
  • Execution delivery.
  • Validation syntax-validated. External tools and provider controls require validation in your lab.
yaml
name: Internal developer platform golden path
on:
  workflow_dispatch: {}
jobs:
  delivery:
    runs-on:
    - self-hosted
    - linux
    - platform-lab
    timeout-minutes: 20
    defaults:
      run:
        shell: bash
    steps:
    - uses: actions/checkout@v4
      with:
        persist-credentials: false
        fetch-depth: 0
    - name: Preflight
      run: |-
        test -s catalog-info.yaml
        test -s .github/CODEOWNERS
    - name: Execute
      run: |-
        yq -e '.kind=="Component" and .spec.owner!=null' catalog-info.yaml
        uv sync --locked
        uv run --locked pytest -q
    - name: Verify result
      run: |-
        docker build -t "onboarding:$GITHUB_SHA" .
        docker image inspect "onboarding:$GITHUB_SHA" --format '{{.Id}}'
permissions:
  contents: read

Verification and failure handling. A newly scaffolded repo must identify ownership and build cleanly before catalog onboarding.

Related CICD-411 · CICD-416 · CICD-417 · Workflow reference

T53 ​

Self-service infrastructure provisioning

  • Platform GitHub Actions.
  • File .github/workflows/t53-self-service-infrastructure-provisioning.yml.
  • Prerequisites reviewed request.tfvars, infra backend, terraform, Conftest policy and request approval.
  • Execution delivery.
  • Validation syntax-validated. External tools and provider controls require validation in your lab.
yaml
name: Self-service infrastructure provisioning
on:
  workflow_dispatch: {}
jobs:
  delivery:
    runs-on:
    - self-hosted
    - linux
    - platform-lab
    timeout-minutes: 20
    defaults:
      run:
        shell: bash
    if: github.ref == 'refs/heads/main'
    environment: staging
    steps:
    - uses: actions/checkout@v4
      with:
        persist-credentials: false
        fetch-depth: 0
    - name: Preflight
      run: |-
        terraform -chdir=infra fmt -check -recursive
    - name: Execute
      run: |-
        terraform -chdir=infra init -input=false -lockfile=readonly
        terraform -chdir=infra plan -input=false -var-file=../request.tfvars -out=request.tfplan
        umask 077
        terraform -chdir=infra show -json request.tfplan > request-plan.json
        conftest test request-plan.json --policy policy/terraform
    - name: Verify result
      run: |-
        terraform -chdir=infra apply -input=false -lock-timeout=2m request.tfplan
permissions:
  contents: read
concurrency:
  group: t53-reviewed-delivery
  cancel-in-progress: false

Verification and failure handling. Use a trusted protected worker. Treat the request plan as sensitive and apply only an approved request.

Related CICD-235 · CICD-244 · CICD-418 · CICD-419 · Workflow reference