CI/CD Infrastructure Overview

This page is the entry point to the StellaOps CI/CD documentation. It explains how the pipeline is organized — the trigger tiers, workflow categories, environment promotion flow, and the determinism and supply-chain guarantees that the pipeline enforces. It is written for engineers who need to understand what runs when, and how to trigger releases.

Altitude note. Workflow names, schedules, and counts drift as the pipeline evolves; the authoritative definitions live in the workflow files under .gitea/workflows/. Treat the tables below as orientation and verify specifics against the workflow sources. Where this page cites a count or time, it is a snapshot, not a contract.


Architecture Overview

The StellaOps CI/CD infrastructure uses Gitea Actions (GitHub Actions compatible) with a sophisticated multi-tier triggering strategy designed for:

Pipeline Tiers

┌─────────────────────────────────────────────────────────────────────────┐
│                        TRIGGER HIERARCHY                                 │
├─────────────────────────────────────────────────────────────────────────┤
│                                                                         │
│  TIER 1: PR GATING (Every Pull Request)                                │
│  ├── test-matrix.yml (Unit, Architecture, Contract, Integration,       │
│  │                    Security, Golden)                                 │
│  ├── build-test-deploy.yml (Build verification)                        │
│  ├── policy-lint.yml (Policy file validation)                          │
│  ├── sast-scan.yml (Static security analysis)                          │
│  └── docs.yml (Documentation validation)                               │
│                                                                         │
│  TIER 2: MAIN BRANCH (Post-Merge)                                      │
│  ├── All Tier 1 workflows                                              │
│  ├── build-test-deploy.yml → Deploy stage (staging environment)        │
│  ├── integration-tests-gate.yml → Extended coverage                    │
│  └── coverage-report (Full coverage analysis)                          │
│                                                                         │
│  TIER 3: SCHEDULED (Nightly/Weekly)                                    │
│  ├── nightly-regression.yml (2:00 AM UTC daily)                        │
│  ├── test-matrix.yml → Extended tests (5:00 AM UTC daily)              │
│  ├── dependency-security-scan.yml (2:00 AM UTC Sunday)                 │
│  ├── renovate.yml (3:00 AM & 3:00 PM UTC daily)                        │
│  ├── sast-scan.yml (3:30 AM UTC Monday)                                │
│  └── migration-test.yml (4:30 AM UTC daily)                            │
│                                                                         │
│  TIER 4: RELEASE (Tag-Triggered)                                       │
│  ├── release-suite.yml (suite-YYYY.MM tags)                            │
│  ├── release.yml (v* tags)                                             │
│  └── module-publish.yml (module-*-v* tags)                             │
│                                                                         │
│  TIER 5: MANUAL (On-Demand)                                            │
│  ├── cli-build.yml, scanner-determinism.yml                            │
│  ├── rollback.yml, promote.yml                                         │
│  └── 20+ specialized test/debug workflows                              │
│                                                                         │
└─────────────────────────────────────────────────────────────────────────┘

Workflow Categories

1. Core Build & Test (12 workflows)

WorkflowPurposeTriggers
build-test-deploy.ymlMain build pipelinePR, main push, daily, manual
test-matrix.ymlUnified test executionPR, main push, daily, manual
integration-tests-gate.ymlExtended integration testingPR, main push, manual
nightly-regression.ymlComprehensive nightly suiteDaily 2 AM UTC
migration-test.ymlDatabase migration validationPR (migrations), daily

2. Release Automation (8 workflows)

WorkflowPurposeTriggers
release-suite.ymlUbuntu-style suite releasessuite-* tags, manual
release.ymlVersion bundle releasesv* tags, manual
module-publish.ymlPer-module publishingmodule-*-v* tags, manual
cli-build.ymlMulti-platform CLI buildsManual only
promote.ymlEnvironment promotionManual only
rollback.ymlEmergency rollbackManual only

3. Security Scanning (6 workflows)

WorkflowPurposeTriggers
sast-scan.ymlStatic code analysisPR, main push, weekly
secrets-scan.ymlCredential detectionPR, main push
container-scan.ymlImage vulnerability scanningDockerfile changes, daily
dependency-security-scan.ymlNuGet/npm vulnerability auditWeekly, PR (deps)
dependency-license-gate.ymlLicense compliancePR (deps)

4. Quality Assurance (15 workflows)

WorkflowPurposeTriggers
policy-lint.ymlPolicy file validationPR, main push
docs.ymlDocumentation lintingdocs/** changes
scanner-determinism.ymlOutput reproducibilityManual only
determinism-gate.ymlBuild determinismManual only
cross-platform-determinism.ymlMulti-OS verificationManual only

5. Module-Specific (30+ workflows)

Specialized workflows for individual modules (Scanner, Concelier, Authority, etc.)


Trigger Quick Reference

Branch Patterns

PatternExampleWorkflows Triggered
Push to mainDirect commit or mergeAll Tier 1 + Tier 2
Push to developFeature integrationSelected gating workflows
Pull RequestAny PR to main/developAll Tier 1 (gating)
Push to feature/*Feature branchesNone (PR required)
Push to release/*Release prep branchesSelected validation

Tag Patterns

PatternExampleWorkflow
v*v2025.12.1release.yml
suite-*suite-2026.04release-suite.yml
module-*-v*module-authority-v1.2.3module-publish.yml

Schedule Summary

Time (UTC)FrequencyWorkflow
2:00 AMDailynightly-regression.yml
2:00 AMSundaydependency-security-scan.yml
3:00 AMDailyrenovate.yml
3:30 AMMondaysast-scan.yml
4:30 AMDailymigration-test.yml
5:00 AMDailybuild-test-deploy.yml, test-matrix.yml
3:00 PMDailyrenovate.yml

Environment Flow

┌──────────┐    ┌──────────┐    ┌──────────┐    ┌──────────┐
│    PR    │───▶│  Staging │───▶│  Stable  │───▶│   LTS    │
│ (Preview)│    │  (Edge)  │    │ (Tested) │    │(Long-Term)│
└──────────┘    └──────────┘    └──────────┘    └──────────┘
     │               │               │               │
     │               │               │               │
     ▼               ▼               ▼               ▼
  PR tests      Auto-deploy      promote.yml    promote.yml
  (gating)      on main merge    (manual)       (manual)

Environment Matrix

EnvironmentBranch/TagAuto-DeployRollback
PreviewPRYes (ephemeral)N/A
Staging (Edge)mainYesrollback.yml
Stablev* tagsManualrollback.yml
LTSsuite-* tagsManualrollback.yml

Key Features

1. PR-Gating Tests

Required tests that must pass before merge:

2. Determinism Verification

All builds produce identical outputs:

3. Supply Chain Security

4. Rollback Automation

Emergency rollback via rollback.yml:


Directory Structure

.gitea/
├── workflows/           # workflow definitions
│   ├── build-test-deploy.yml
│   ├── test-matrix.yml
│   ├── release-suite.yml
│   └── ...
├── scripts/             # CI/CD scripts
│   ├── build/           # Build orchestration
│   ├── test/            # Test execution
│   ├── release/         # Release automation
│   ├── sign/            # Signing operations
│   └── validate/        # Validation scripts
└── docs/                # CI-specific docs
    ├── architecture.md
    ├── scripts.md
    └── troubleshooting.md

devops/
├── scripts/
│   └── lib/             # Shared bash libraries
│       ├── logging.sh
│       ├── exit-codes.sh
│       ├── git-utils.sh
│       ├── path-utils.sh
│       └── hash-utils.sh
├── compose/             # Docker Compose profiles
├── helm/                # Helm charts
└── docker/              # Dockerfiles

Getting Started

Running Workflows Locally

# Run test matrix locally
./devops/scripts/test-local.sh

# Validate compose files
./devops/scripts/validate-compose.sh

# Run a specific test category
./.gitea/scripts/test/run-test-category.sh Unit

Triggering Manual Workflows

# Via Gitea UI: Actions → Workflow → Run workflow

# Or via API:
curl -X POST \
  -H "Authorization: token $GITEA_TOKEN" \
  "$GITEA_URL/api/v1/repos/owner/repo/actions/workflows/rollback.yml/dispatches" \
  -d '{"ref":"main","inputs":{"environment":"staging","version":"v2025.12.0"}}'

Creating a Release

  1. Module Release:

    git tag module-authority-v1.2.3
    git push origin module-authority-v1.2.3
    
  2. Suite Release:

    git tag suite-2026.04
    git push origin suite-2026.04
    
  3. Bundle Release:

    git tag v2025.12.1
    git push origin v2025.12.1
    


Metrics & Monitoring

The targets below are the pipeline’s service-level objectives. Live workflow runs, test artifacts, and coverage reports are surfaced in the Gitea Actions UI for the repository (.gitea/workflows/); they are not part of this documentation tree.

MetricTargetMeasurement
PR build time< 15 minWorkflow duration
Main build time< 20 minWorkflow duration
Test flakiness< 1%Flaky test detection
Security scan coverage100%SAST/DAST coverage
Rollback SLA< 5 minRollback workflow duration