# CI/CD Pipeline

## Platform

**CI Server**: Woodpecker CI (self-hosted)
**Agent architecture**: ARM64 (AMD64 prepared but not yet active)

## Pipeline Stages

```mermaid
flowchart LR
    Push[Push/PR to dev/stage/main] --> Test[01-test]
    Test --> Build[02-build-push]
```

### 01-test (Unit Tests)

| Property | Value |
|----------|-------|
| Trigger | push, pull_request, manual |
| Branches | dev, stage, main |
| Image | mcr.microsoft.com/dotnet/sdk:10.0 (was `:8.0` through cycle 3 — bumped by AZ-500) |
| Steps | `dotnet restore` → `dotnet test` (Release config) |
| Output | TRX test results |

### 02-build-push (Docker Build & Push)

| Property | Value |
|----------|-------|
| Trigger | push, manual |
| Branches | dev, stage, main |
| Depends on | 01-test (must pass) |
| Image | docker (DinD via socket mount) |
| Tag format | `{branch}-arm` (e.g., `dev-arm`) |
| Registry | Private (from secrets: registry_host, registry_user, registry_token) |

## Multi-Architecture Strategy

- Currently: ARM64 only
- Prepared: AMD64 entry commented out in matrix
- Tag suffix distinguishes architectures (`-arm`, `-amd`)

## Secrets

| Secret | Purpose |
|--------|---------|
| registry_host | Container registry URL |
| registry_user | Registry username |
| registry_token | Registry password/token |
