Skip to main content

Continuous Delivery & GitOps (CD)

The Harness Continuous Delivery (CD) module provides powerful deployment automation capabilities, supporting multiple deployment strategies and target environments. Combined with GitOps methodology, it enables dual Git management of infrastructure and applications.

Core Features

Deployment Strategies

  • Blue-Green Deployment: Run two environments simultaneously for zero-downtime switching
  • Canary Release: Gradually shift traffic to the new version, reducing release risk
  • Rolling Deployment: Update in batches without requiring additional infrastructure
  • Builtin Deployment: Directly replace the old version

GitOps Workflow

  • Declarative Configuration: Define desired state as code
  • Auto-Sync: Monitor system state and automatically correct deviations
  • Multi-Environment Support: Manage development, testing, staging, production, and more

Deployment Targets

  • Kubernetes: Native Kubernetes deployment
  • Helm: Helm Chart deployment
  • Custom Scripts: Support arbitrary deployment methods
  • Cloud Services: AWS, Azure, GCP, and other major cloud platforms
  • Virtual Machines: Physical or virtual machine deployment

Quality Gates & Approvals

  • Manual Approval: Human confirmation before proceeding
  • Auto Verification: Decide whether to continue based on test results
  • Policy Enforcement: Define deployment policies using OPA

Use Cases

ScenarioRecommended Strategy
High Availability AppsCanary Release + Auto Rollback
Fast IterationRolling Deployment + Blue-Green Switch
Critical SystemsBlue-Green Deployment + Multi-Stage Approval
GitOps ManagementGitOps Auto-Sync

Getting Started

1. Create Application

Create a CD application in Harness and define deployment targets.

2. Configure Service

Define the service (Artifact) to deploy and target infrastructure.

3. Define Environments

Create development, testing, production, etc., and configure corresponding infrastructure.

4. Configure Pipeline

Design a pipeline with deployment stages, adding quality gates and approval nodes.

5. Set Triggers

Configure deployment rules based on CI completion, Git events, or manual triggers.

Best Practices

  1. Small Batches: Frequent small releases reduce risk
  2. Automate Everything: Reduce manual operations and error rates
  3. Monitor Rollbacks: Configure automatic rollback conditions
  4. Progressive Releases: Gradually expand the scope of impact