Deploy with confidence. Zero-downtime releases with blue-green, canary, or rolling strategies. Auto-rollback on failure.
---
name: deployment-automation
slug: deployment-automation
version: 1.0.1
description: Deploy with confidence. Zero-downtime releases with blue-green, canary, or rolling strategies. Auto-rollback on failure.
author: SKY-lv
license: MIT-0
tags: [automation, devops, deployment]
keywords: [deployment, CI/CD, release automation, deploy pipeline, continuous deployment, zero-downtime, blue-green, canary, rollback]
triggers: deployment, deploy, CI/CD, release, deploy pipeline, continuous deployment
---
# deployment-automation
> Deploy with confidence. Zero-downtime releases, instant rollback, and health checks that catch issues before users do.
## What It Does
- **Multi-strategy** — Blue-green, canary, or rolling deployments
- **Zero downtime** — Health checks before/after each step
- **Auto-rollback** — Instant revert on failure
- **Multi-env** — Dev → staging → production promotion
- **Notifications** — Slack, email, PagerDuty on deploy events
---
## Quick Start
```bash
# 1. Create deployment pipeline
node deploy.js pipeline create --name prod --stages build,test,deploy
# 2. Deploy with canary strategy
node deploy.js deploy --strategy canary --service api --canary-percent 10
# 3. Check deployment status
node deploy.js status --service api
# 4. Rollback if needed
node deploy.js rollback --service api --to previous
```
---
## Common Use Cases
### 🚀 Production Release
```bash
# Deploy with canary (10% traffic first)
node deploy.js deploy --strategy canary --service web --canary-percent 10
# Monitor for 10 minutes, then increase
node deploy.js canary --service web --percent 50
node deploy.js canary --service web --percent 100
```
### 🔄 Blue-Green Swap
```bash
# Deploy to green environment
node deploy.js deploy --strategy blue-green --service api
# Test green, then swap
node deploy.js swap --service api
# Instant rollback if issues
node deploy.js rollback --service api --to blue
```
### 🏥 Hotfix Emergency
```bash
# Deploy hotfix with extra verification
node deploy.js deploy --service api --ref hotfix-branch \
--health-check-timeout 60s \
--auto-rollback
```
### 📈 Promote Across Environments
```bash
# Promote staging to production
node deploy.js promote --from staging --to production --approve
# View config differences
node deploy.js diff --env staging vs production
```
---
## All Commands
| Command | Purpose |
|---------|---------|
| `deploy --strategy <s>` | Deploy with strategy |
| `status --service <name>` | Check deployment status |
| `rollback --to <version>` | Revert to previous version |
| `promote --from <env>` | Promote across environments |
| `diff --env <a> vs <b>` | Compare environment configs |
| `canary --percent <n>` | Adjust canary traffic |
| `swap` | Blue-green swap |
---
## Configuration
```json
{
"pipeline": {
"environments": ["dev", "staging", "production"],
"strategy": "canary",
"canaryPercent": 10,
"healthCheck": {
"endpoint": "/health",
"timeout": "30s",
"retries": 3
},
"rollback": {
"autoOnFailure": true,
"maxRetries": 3
},
"notifications": {
"onStart": ["slack"],
"onSuccess": ["slack", "email"],
"onFailure": ["slack", "pagerduty"]
}
}
}
```
don't have the plugin yet? install it then click "run inline in claude" again.