mirror of
https://github.com/luongnv89/claude-howto.git
synced 2026-04-30 21:57:48 +02:00
7db5ade777
Added comprehensive examples for Claude Code features including slash commands, subagents, memory, MCP protocol, skills, and plugins with documentation and quick reference guides. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
26 lines
594 B
Bash
26 lines
594 B
Bash
#!/bin/bash
|
|
set -e
|
|
|
|
echo "⏪ Starting rollback..."
|
|
|
|
ENV=${1:-staging}
|
|
echo "📦 Target environment: $ENV"
|
|
|
|
# Get previous deployment
|
|
PREVIOUS=$(kubectl rollout history deployment/app -n $ENV | tail -2 | head -1 | awk '{print $1}')
|
|
echo "🔄 Rolling back to revision: $PREVIOUS"
|
|
|
|
# Execute rollback
|
|
kubectl rollout undo deployment/app -n $ENV
|
|
|
|
# Wait for rollback
|
|
echo "⏳ Waiting for rollback to complete..."
|
|
kubectl rollout status deployment/app -n $ENV
|
|
|
|
# Health check
|
|
echo "🏥 Running health checks..."
|
|
sleep 5
|
|
curl -f http://api.$ENV.example.com/health
|
|
|
|
echo "✅ Rollback complete!"
|