ci-cd-optimizer
CI/CD Optimizer
Optimize CI/CD pipelines for faster builds and reliable deployments.
Quick Start
Parallelize jobs, cache dependencies, use smaller images, implement health checks, automate rollbacks.
Instructions
Pipeline Optimization
Parallel execution:
# GitHub Actions
jobs:
test:
strategy:
matrix:
node: [14, 16, 18]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- run: npm test
Caching dependencies:
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Docker layer caching:
# Order layers by change frequency
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
Deployment Strategies
Blue-green deployment:
deploy:
steps:
- name: Deploy to green
run: kubectl set image deployment/app app=myapp:${{ github.sha }} --record
- name: Wait for rollout
run: kubectl rollout status deployment/app
- name: Run smoke tests
run: ./smoke-tests.sh
- name: Switch traffic
run: kubectl patch service app -p '{"spec":{"selector":{"version":"green"}}}'
Canary deployment:
- name: Deploy canary (10%)
run: kubectl set image deployment/app-canary app=myapp:${{ github.sha }}
- name: Monitor metrics
run: ./check-metrics.sh
- name: Promote to 100%
run: kubectl set image deployment/app app=myapp:${{ github.sha }}
Best Practices
- Fail fast with linting/tests first
- Use matrix builds for multiple versions
- Cache dependencies and build artifacts
- Use smaller Docker images
- Implement automated rollbacks
- Add health checks
- Monitor pipeline metrics
More from armanzeroeight/fastagent-plugins
gcp-cost-optimizer
Analyzes GCP costs and provides optimization recommendations including committed use discounts, rightsizing, and unused resources. Use when optimizing GCP spending or analyzing GCP costs.
15kubernetes-best-practices
Provides production-ready Kubernetes manifest guidance including resource management, security, high availability, and configuration best practices. This skill should be used when working with Kubernetes YAML files, deployments, pods, services, or when users mention k8s, container orchestration, or cloud-native applications.
11schema-designer
Design database schemas with proper normalization, relationships, constraints, and indexes. Use when creating database tables, modeling data relationships, or designing database structure.
11api-documentation-generator
Generate OpenAPI/Swagger specifications and API documentation from code or design. Use when creating API docs, generating OpenAPI specs, or documenting REST APIs.
9goroutine-patterns
Implement Go concurrency patterns using goroutines, channels, and synchronization primitives. Use when building concurrent systems, implementing parallelism, or managing goroutine lifecycles. Trigger words include "goroutine", "channel", "concurrent", "parallel", "sync", "context".
9inventory-manager
Organizes Ansible inventory files, manages host groups, and configures dynamic inventory. Use when organizing Ansible inventory, managing host groups, or setting up dynamic inventory sources.
9