cicd-pipelines
GitHub Actions, GitLab CI, Jenkins, and automated deployment pipelines
What this skill does
# CI/CD Pipelines
Production CI/CD with GitHub Actions, testing automation, and deployment strategies.
## Quick Start
```yaml
# .github/workflows/ci.yml
name: CI Pipeline
on:
push:
branches: [main, develop]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Run linting
run: ruff check .
- name: Run type checking
run: mypy src/
- name: Run tests
run: pytest tests/ --cov=src --cov-report=xml
- name: Upload coverage
uses: codecov/codecov-action@v3
with:
file: coverage.xml
```
## Core Concepts
### 1. Complete CI/CD Pipeline
```yaml
# .github/workflows/deploy.yml
name: Deploy Pipeline
on:
push:
branches: [main]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: pip install -r requirements.txt && pytest
build:
needs: test
runs-on: ubuntu-latest
outputs:
image_tag: ${{ steps.meta.outputs.tags }}
steps:
- uses: actions/checkout@v4
- name: Log in to registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=sha,prefix=
type=ref,event=branch
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=gha
cache-to: type=gha,mode=max
deploy-staging:
needs: build
runs-on: ubuntu-latest
environment: staging
steps:
- name: Deploy to staging
run: |
kubectl set image deployment/app \
app=${{ needs.build.outputs.image_tag }}
deploy-production:
needs: [build, deploy-staging]
runs-on: ubuntu-latest
environment: production
steps:
- name: Deploy to production
run: |
kubectl set image deployment/app \
app=${{ needs.build.outputs.image_tag }}
```
### 2. Matrix Testing
```yaml
jobs:
test:
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
os: [ubuntu-latest, macos-latest]
database: [postgres, mysql]
exclude:
- os: macos-latest
database: mysql
runs-on: ${{ matrix.os }}
services:
postgres:
image: postgres:16
env:
POSTGRES_PASSWORD: test
options: >-
--health-cmd pg_isready
--health-interval 10s
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- run: pytest --db=${{ matrix.database }}
```
### 3. Reusable Workflows
```yaml
# .github/workflows/python-ci.yml (reusable)
name: Python CI
on:
workflow_call:
inputs:
python-version:
required: false
type: string
default: '3.12'
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
- run: pip install -r requirements.txt && pytest
# Usage in another workflow
jobs:
ci:
uses: ./.github/workflows/python-ci.yml
with:
python-version: '3.11'
```
### 4. Deployment Strategies
```yaml
# Blue-Green Deployment
deploy:
steps:
- name: Deploy to green
run: |
kubectl apply -f k8s/deployment-green.yaml
kubectl rollout status deployment/app-green
- name: Run smoke tests
run: ./scripts/smoke-test.sh $GREEN_URL
- name: Switch traffic
run: |
kubectl patch service app \
-p '{"spec":{"selector":{"version":"green"}}}'
- name: Cleanup blue
run: kubectl delete deployment app-blue
# Canary Deployment
deploy-canary:
steps:
- name: Deploy canary (10%)
run: |
kubectl apply -f k8s/deployment-canary.yaml
kubectl scale deployment/app-canary --replicas=1
kubectl scale deployment/app-stable --replicas=9
- name: Monitor canary
run: ./scripts/monitor-canary.sh --duration=30m
- name: Promote or rollback
run: |
if [ "$CANARY_SUCCESS" == "true" ]; then
kubectl scale deployment/app-canary --replicas=10
kubectl scale deployment/app-stable --replicas=0
else
kubectl delete deployment/app-canary
fi
```
## Tools & Technologies
| Tool | Purpose | Version (2025) |
|------|---------|----------------|
| **GitHub Actions** | CI/CD platform | Latest |
| **GitLab CI** | CI/CD platform | 16+ |
| **ArgoCD** | GitOps for K8s | 2.10+ |
| **Terraform** | Infrastructure | 1.6+ |
| **act** | Local testing | 0.2+ |
## Troubleshooting Guide
| Issue | Symptoms | Root Cause | Fix |
|-------|----------|------------|-----|
| **Workflow Not Running** | No job triggered | Wrong trigger config | Check `on:` section |
| **Secret Not Available** | Empty variable | Missing secret | Add in repo settings |
| **Slow Builds** | Long duration | No caching | Add cache steps |
| **Flaky Tests** | Random failures | Race conditions | Fix tests, add retries |
## Best Practices
```yaml
# ✅ DO: Cache dependencies
- uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
# ✅ DO: Use environments for deployments
environment: production
# ✅ DO: Pin action versions
- uses: actions/checkout@v4 # Not @main
# ✅ DO: Add timeouts
jobs:
test:
timeout-minutes: 10
# ❌ DON'T: Store secrets in code
# ❌ DON'T: Skip tests for faster deployments
```
## Resources
- [GitHub Actions Docs](https://docs.github.com/en/actions)
- [GitLab CI Docs](https://docs.gitlab.com/ee/ci/)
- [ArgoCD Docs](https://argo-cd.readthedocs.io/)
---
**Skill Certification Checklist:**
- [ ] Can create CI pipelines with testing
- [ ] Can build and push Docker images
- [ ] Can deploy to Kubernetes
- [ ] Can implement deployment strategies
- [ ] Can create reusable workflows
Related in Cloud & DevOps
appbuilder-action-scaffolder
IncludedCreate, implement, deploy, and debug Adobe Runtime actions with consistent layout, validation, and error handling. Use this skill whenever the user needs to add actions to an App Builder project, understand action structure (params, response format, web/raw actions), configure actions in the manifest, use App Builder SDKs (State, Files, Events, database), deploy and invoke actions via CLI, debug action issues, or implement patterns such as webhook receivers, custom event providers, journaling consumers, large payload redirects, action sequence pipelines, and Asset Compute workers. Also trigger when users mention serverless functions in Adobe context, action logging, IMS authentication for actions, or cron-style scheduled actions.
orchestrating-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. Use this skill when the user needs a multi-step Data Cloud pipeline, cross-phase troubleshooting, or data space and data kit management. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase sf data360 workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching phase-specific skill), the task is STDM/session tracing/parquet telemetry (use observing-agentforce), standard CRM SOQL (use querying-soql), or Apex implementation (use generating-apex).
github-project-automation
IncludedAutomate GitHub repository setup with CI/CD workflows, issue templates, Dependabot, and CodeQL security scanning. Includes 12 production-tested workflows and prevents 18 errors: YAML syntax, action pinning, and configuration. Use when: setting up GitHub Actions CI/CD, creating issue/PR templates, enabling Dependabot or CodeQL scanning, deploying to Cloudflare Workers, implementing matrix testing, or troubleshooting YAML indentation, action version pinning, secrets syntax, runner versions, or CodeQL configuration. Keywords: github actions, github workflow, ci/cd, issue templates, pull request templates, dependabot, codeql, security scanning, yaml syntax, github automation, repository setup, workflow templates, github actions matrix, secrets management, branch protection, codeowners, github projects, continuous integration, continuous deployment, workflow syntax error, action version pinning, runner version, github context, yaml indentation error
sf-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase `sf data360` workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching sf-datacloud-* skill), the task is STDM/session tracing/parquet telemetry (use sf-ai-agentforce-observability), standard CRM SOQL (use sf-soql), or Apex implementation (use sf-apex).
fabric-cli
IncludedUse this skill for Fabric.so CLI workflows with the `fabric` terminal command: diagnose/install/login, search or browse a Fabric library, save notes/links/files, create folders, ask the Fabric AI assistant, manage tasks/workspaces, generate shell completion, check subscription usage, produce JSON output, and use Fabric as persistent agent memory. Do not use for Microsoft Fabric/Azure/Power BI `fab`, Daniel Miessler's Fabric framework, Python Fabric SSH, Fabric.js, or textile/fashion fabric.
lark
IncludedLark/Feishu CLI skills: lark-cli operations for docs, markdown, sheets, base, calendar, im, mail, task, okr, drive, wiki, slides, whiteboard, apps, approval, attendance, contact, vc, minutes, event. Use when the user needs to operate Lark/Feishu resources via lark-cli, send messages, manage documents, spreadsheets, calendars, tasks, OKRs, deploy web pages, or any Feishu/Lark workspace operations.