MATIH Platform is in active MVP development. Documentation reflects current implementation status.
18. CI/CD & Build System
CD Deployment Workflow

CD Deployment Workflow

The CD pipeline deploys the MATIH platform to target environments. It supports automatic deployment on push to main, tag-based releases, and manual workflow dispatch with environment and component selection.

Source file: .github/work-flows/cd.yml


Triggers

EventConditionDefault Environment
Push to mainAutomaticdev
Tag v*Automaticstaging
workflow_dispatchManualSelected by user

Workflow Inputs (Manual Dispatch)

InputTypeOptionsDescription
environmentchoicedev, staging, prodTarget environment
versionstringOptionalSpecific version to deploy
componentchoiceall, control-plane, data-plane, infraDeployment scope

Jobs

1. Prepare Deployment

Determines deployment parameters based on trigger type:

TriggerVersionEnvironment
Push to mainGit SHAdev
TagTag name (minus v prefix)staging
ManualUser input or latestUser selected

2. Build and Push Images

Builds Docker images and pushes to the container registry:

- name: Build and push
  uses: docker/build-push-action@v5
  with:
    push: true
    tags: ${{ env.REGISTRY }}/matih/${{ matrix.service }}:${{ needs.prepare.outputs.version }}

3. Deploy to Environment

Executes the deployment using the CD pipeline script:

./scripts/cd-new.sh ${{ needs.prepare.outputs.component }} ${{ needs.prepare.outputs.environment }}

4. Post-Deployment Validation

Runs Stage 18 validation checks and reports status.


Concurrency Control

concurrency:
  group: cd-${{ github.ref }}-${{ inputs.environment || 'dev' }}
  cancel-in-progress: false

CD deployments never cancel in-progress runs to avoid partial deployments.


Environment Protection

EnvironmentProtectionApprovers
devNoneAutomatic
stagingRequired reviewPlatform team
prodRequired review + waitPlatform leads

Secrets Required

SecretDescription
AZURE_CREDENTIALSAzure service principal for AKS access
ACR_USERNAMEAzure Container Registry username
ACR_PASSWORDAzure Container Registry password
KUBE_CONFIGKubernetes cluster configuration

Related Pages