Trovella Wiki

Pipeline Overview

CI/CD pipeline structure -- five jobs, their triggers, dependencies, timeouts, and the path from push to production.

Trovella's CI/CD pipeline runs in GitHub Actions as a single workflow (.github/workflows/ci.yml). Every push and PR triggers quality checks. Merges to main additionally build a Docker image, optionally migrate the production database, and deploy to the production VM.

The pipeline was restructured from a monolithic 11-minute sequential job into parallel jobs that complete in ~3.5 minutes. See ADR-012: CI/CD Pipeline for the decision history.

Pipeline Structure

Five jobs with explicit dependency gates:

push / PR to main
  |
  +---> quality (15 min) --------+-----------> deploy-prod (10 min)
  |                              |                    ^
  +---> docs (5 min)             |                    |
  |                              v                    |
  +---> build-push (15 min) -----+--------------------+
         (main only)             |
                                 v
                           migrate-prod (5 min)
                             (main only)

deploy-prod requires three upstream jobs to pass: quality, build-push, and migrate-prod. The docs job runs independently and does not gate deployment.

Job Summary

JobTriggerDepends OnGates Deploy?Timeout
qualityAll pushes and PRsNoneYes15 min
docsAll pushes and PRsNoneNo5 min
build-pushMain branch onlyNone (parallel)Yes15 min
migrate-prodMain branch onlyqualityYes5 min
deploy-prodMain branch onlyquality + build-push + migrate-prodN/A (is the deploy)10 min

Typical wall-clock time from merge to live: 5--10 minutes.

Trigger Conditions

The workflow fires on two events:

  • push to main -- triggers all five jobs (quality, docs, build-push, migrate-prod, deploy-prod)
  • pull_request targeting main -- triggers only quality and docs

The build-push, migrate-prod, and deploy-prod jobs have an explicit condition:

if: github.event_name == 'push' && github.ref == 'refs/heads/main'

This means PR branches only run quality checks -- they never build Docker images or touch production infrastructure.

Service Containers

The quality job starts three service containers for integration tests:

ServiceImagePortHealth Check
PostgreSQL 18pgvector/pgvector:pg185433pg_isready every 5s
Redis 8redis:8-alpine6379redis-cli ping every 5s
Typesense 27.1typesense/typesense:27.18108None (starts quickly)

These containers run on the GitHub Actions runner alongside the job steps. They are ephemeral -- destroyed when the workflow completes.

Artifacts

Two artifacts are uploaded (with 14-day retention):

ArtifactJobConditionContents
jscpd-reportqualityAlways (even on failure)HTML duplication report
docs-freshness-reportdocsAlways (even on failure)JSON stale-docs report

Pages in This Topic

Cross-Domain References

On this page