MATIH Platform is in active MVP development. Documentation reflects current implementation status.
7. Tenant Lifecycle
Platform Deployment
Rolling Updates

Rolling Updates

Rolling updates are tracked through the platform deployment system. Each deployment recorded by the CD pipeline creates a new entry in the deployment history, providing a complete timeline of all platform changes.


Deployment History

GET /api/v1/platform/deployments/history?environment=dev&limit=10

Returns deployments ordered by deployment time (most recent first):

[
  {
    "id": "uuid-1",
    "imageTag": "v2.1.0-abc1234",
    "gitCommit": "abc1234",
    "gitBranch": "main",
    "environment": "dev",
    "status": "DEPLOYED",
    "deployedAt": "2026-02-12T10:00:00Z",
    "completedAt": "2026-02-12T10:05:00Z"
  },
  {
    "id": "uuid-2",
    "imageTag": "v2.0.0-def5678",
    "gitCommit": "def5678",
    "gitBranch": "main",
    "environment": "dev",
    "status": "ROLLED_BACK",
    "deployedAt": "2026-02-11T14:00:00Z",
    "completedAt": "2026-02-11T14:08:00Z"
  }
]

Deployment Status Values

StatusDescription
PENDINGDeployment initiated, not yet complete
DEPLOYEDSuccessfully deployed and active
FAILEDDeployment failed during rollout
ROLLED_BACKDeployment was rolled back

Recording a Deployment

The CD pipeline records each deployment upon completion:

POST /api/v1/platform/deployments

The request includes the full deployment metadata. The service stores the record and updates the current image tag reference.


Tracking Environment Promotion

The deployment history across environments shows the promotion path:

  1. Feature branch deployed to dev
  2. After testing, merged to main and deployed to dev
  3. Promoted to staging for integration testing
  4. Promoted to prod for production release

Each promotion is a separate deployment record with the same image tag but different environment values.


Monitoring Deployments

The deployment history provides the data needed for:

Use CaseHow
Deployment frequencyCount deployments per time period
Rollback rateCount deployments with ROLLED_BACK status
Deployment durationcompletedAt - deployedAt for each deployment
Version driftCompare imageTag across environments