Skip to main content

CI/CD Pipeline

GitLab CI/CD Pipelines view showing deploy stages

GitLab CI/CD drives validation, testing, and deployment for the Goosehead Fastlane monorepo. The promotion lane builds the core apps once, promotes them through five environments with manual approval gates, and now sits alongside a release lane for lower-environment release/* deploys from GitLab Run pipeline.

Environment Promotion Model

Hotfixes bypass the promotion chain entirely:

Pipeline Modes

MR Pipeline

Runs on every merge request. Validates code quality, security, builds, and test coverage before merge.

See MR Pipeline for details.

Deploy Pipeline

Runs in two modes:

  • Promotion lane: push to develop, then promote through dev -> qa -> uat -> staging -> prod
  • Release lane: GitLab Run pipeline on release/* with manual target_env inputs. See Manual Pipeline Inputs for the current option contract and rollout notes.

See Deployment for details.

Deployable Apps

AppPathDockerfileRuntime
fastlane-portalapps/fastlane-portalapps/fastlane-portal/Dockerfilenginx:alpine
fastlane-adminapps/fastlane-adminapps/fastlane-admin/Dockerfilenginx:alpine
fastlane-api-gatewayapps/apis/fastlane-api-gatewayapps/apis/fastlane-api-gateway/Dockerfilenode:22-alpine
docsapps/docsapps/docs/Dockerfilenginx:alpine
components (Storybook)libs/ui/componentslibs/ui/components/Dockerfilenginx:alpine

Key Files

FilePurpose
.gitlab-ci.ymlMain pipeline definition (stages, jobs, templates, deploy matrices)
ci/scripts/promote-image.shPull from GitLab CR, retag for Heroku, push, release, health check
ci/scripts/deploy-app.shLegacy Docker build + push (retained for reference)
ci/scripts/claude-mr-review.shAI code review (code quality + security) posted as MR notes
ci/app-to-heroku-mapping.jsonReference mapping of apps to Heroku app names per environment

Pipeline Stages

StageWhenPurpose
detectdevelop / main pushRebuild .env.vault from dotenv.org
validateMRLint, Trivy SCA, Trivy IaC
buildMRParallel NX build of all 5 apps
testMRCoverage + Claude AI review
build-imagesdevelop / main pushBuild Docker images, push to GitLab Container Registry
deploy-devdevelop pushPromote pre-built images to dev Heroku apps
verify-devdevelop pushE2E tests, database migrations, seed
deploy-qamanualDeploy to QA with approval
verify-qaafter QA deployE2E tests against QA
deploy-uatmanualDeploy to UAT with approval
verify-uatafter UAT deployManual release-lane migration job for UAT, when requested
deploy-stagingmanualDeploy to staging with approval
deploy-prodmanualDeploy to production with approval
post-deployafter prod deploySync develop to main / hotfix backport

Documentation