CI/CD - Continuous Integration & Deployment

Status: Active
Last Updated: 2026-08-26 Category: CI/CD & GitOps
Prerequisites: kb/basics/git-fundamentals, kb/containers/docker-basics
Tags: ci-cd, forgejo, woodpecker-ci, gitops, automation, pipelines, self-hosted

Summary

Complete learning path for Continuous Integration and Continuous Deployment using self-hosted, open-source tools. Focus on Forgejo (Git hosting) + Woodpecker CI (pipelines) as the GitLab/GitHub Actions alternative for homelabs and small-medium teams.

๐ŸŽฏ Learning Philosophy

Git โ†’ CI โ†’ CD โ†’ GitOps:

Git Basics โ†’ Forgejo Setup โ†’ Woodpecker CI โ†’ Auto Deploy โ†’ GitOps
 (Version)    (Self-Host)     (Pipelines)    (Delivery)   (Production)

This directory teaches CI/CD assuming basic Git knowledge but no prior CI/CD experience. Progression from manual builds through fully automated GitOps deployments.

๐Ÿ“š Learning Path


Prerequisites: Git fundamentals, Docker basics
         โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  PHASE 1: CI/CD Concepts               โ”‚
โ”‚  โ”œโ”€ What is CI/CD?                     โ”‚
โ”‚  โ”œโ”€ Build โ†’ Test โ†’ Deploy              โ”‚
โ”‚  โ”œโ”€ Why automation matters             โ”‚
โ”‚  โ”œโ”€ Manual vs automated workflows      โ”‚
โ”‚  โ””โ”€ Self-hosted vs cloud services      โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  PHASE 2: Forgejo (Git Hosting)        โ”‚
โ”‚  โ”œโ”€ Self-hosted Git (GitHub alt)       โ”‚
โ”‚  โ”œโ”€ Forgejo installation               โ”‚
โ”‚  โ”œโ”€ User/organization management       โ”‚
โ”‚  โ”œโ”€ Repository setup                   โ”‚
โ”‚  โ”œโ”€ Access control & SSH keys          โ”‚
โ”‚  โ””โ”€ Webhooks integration               โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  PHASE 3: Woodpecker CI                โ”‚
โ”‚  โ”œโ”€ Container-native CI/CD             โ”‚
โ”‚  โ”œโ”€ Woodpecker installation            โ”‚
โ”‚  โ”œโ”€ First pipeline (.woodpecker.yml)   โ”‚
โ”‚  โ”œโ”€ Build steps & Docker images        โ”‚
โ”‚  โ”œโ”€ Testing automation                 โ”‚
โ”‚  โ””โ”€ Secrets management                 โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  PHASE 4: Advanced Pipelines          โ”‚
โ”‚  โ”œโ”€ Multi-stage builds                 โ”‚
โ”‚  โ”œโ”€ Matrix builds (multi-platform)     โ”‚
โ”‚  โ”œโ”€ Caching strategies                 โ”‚
โ”‚  โ”œโ”€ Building Docker images             โ”‚
โ”‚  โ”œโ”€ Publishing to Harbor registry      โ”‚
โ”‚  โ””โ”€ Deployment automation              โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  PHASE 5: GitOps & Production          โ”‚
โ”‚  โ”œโ”€ GitOps principles                  โ”‚
โ”‚  โ”œโ”€ Infrastructure as Code integration โ”‚
โ”‚  โ”œโ”€ Kubernetes/k0s deployments         โ”‚
โ”‚  โ”œโ”€ Rollback strategies                โ”‚
โ”‚  โ”œโ”€ Monitoring & alerting              โ”‚
โ”‚  โ””โ”€ Production best practices          โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ“– Articles in This Directory

โœ… Recently Created (2026-08-26 headless-browser research session)

๐ŸŸข Phase 1: CI/CD Fundamentals (Start Here)

Understanding the Basics:

  1. cicd-concepts - What is CI/CD and why it matters

    • Continuous Integration explained
    • Continuous Deployment vs Delivery
    • Traditional vs modern workflows
    • Benefits and tradeoffs
    • Prerequisites: None
    • Time: 1 hour
    • Resources: [โ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘] 20% - Conceptual
  2. manual-vs-automated - Why automate your workflow

    • Manual deployment pain points
    • Automation benefits
    • When to automate
    • Cost-benefit analysis
    • Prerequisites: Development experience
    • Time: 1 hour
    • Resources: [โ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘] 20%
  3. self-hosted-vs-cloud - Self-hosted CI/CD advantages

    • GitHub Actions vs Woodpecker
    • GitLab CI/CD vs self-hosted
    • Privacy and control
    • Cost comparison
    • Prerequisites: CI/CD concepts
    • Time: 1 hour
    • Resources: [โ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘] 20%

๐ŸŸก Phase 2: Forgejo (Self-Hosted Git)

  1. forgejo-introduction - Forgejo as GitHub alternative

    • What is Forgejo (Gitea fork)
    • Why Forgejo over Gitea/GitLab
    • Feature comparison
    • Use cases
    • Prerequisites: Git basics
    • Time: 1 hour
    • Resources: [โ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘] 20%
  2. forgejo-installation - Installing Forgejo

    • Docker compose setup
    • Reverse proxy (Traefik/Caddy)
    • Database configuration
    • Initial admin setup
    • SSL/TLS configuration
    • Prerequisites: Docker basics
    • Time: 2-3 hours
    • Resources: [โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘] 50% - 2GB RAM
  3. forgejo-organization - Organizing repositories

    • Creating organizations
    • Team management
    • Repository permissions
    • SSH key management
    • Webhook configuration
    • Prerequisites: Forgejo installed
    • Time: 2 hours
    • Resources: [โ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘] 30%
  4. migrating-to-forgejo - Migrate from GitHub/GitLab

    • Repository migration tools
    • Preserving history
    • Updating CI/CD configs
    • Team transition
    • Prerequisites: Existing Git repos
    • Time: 2-4 hours
    • Resources: [โ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘] 40%

๐ŸŸ  Phase 3: Woodpecker CI (Pipeline Automation)

  1. woodpecker-introduction - Container-native CI/CD

    • What is Woodpecker CI
    • Drone CI fork benefits
    • Architecture overview
    • Forgejo integration
    • Prerequisites: CI/CD concepts
    • Time: 1 hour
    • Resources: [โ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘] 20%
  2. woodpecker-installation - Installing Woodpecker

    • Docker compose deployment
    • Forgejo OAuth setup
    • Agent configuration
    • First repository activation
    • Prerequisites: Forgejo running
    • Time: 2-3 hours
    • Resources: [โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘] 50% - 2GB RAM
  3. first-pipeline - Your first .woodpecker.yml

    • Pipeline syntax basics
    • Build steps
    • Docker image selection
    • Testing commands
    • Pipeline execution
    • Prerequisites: Woodpecker installed
    • Time: 2-3 hours
    • Resources: [โ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘] 40%
  4. pipeline-syntax - Woodpecker YAML deep dive

    • Pipeline structure
    • Step configuration
    • Environment variables
    • Conditional execution
    • Services (databases, Redis)
    • Prerequisites: First pipeline
    • Time: 3-4 hours
    • Resources: [โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘] 50%
  5. secrets-management - Secure secrets in pipelines

    • Adding secrets to Woodpecker
    • Environment-specific secrets
    • Using secrets in steps
    • Security best practices
    • Cross-reference: kb/security/vault-basics
    • Prerequisites: Pipeline basics
    • Time: 2 hours
    • Resources: [โ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘] 40%

๐Ÿ”ด Phase 4: Advanced Pipelines (Power User)

  1. matrix-builds - Multi-platform testing

    • Matrix strategy explained
    • Testing multiple versions
    • Cross-platform builds
    • Parallel execution
    • Prerequisites: Pipeline syntax
    • Time: 2-3 hours
    • Resources: [โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘] 60%
  2. caching-strategies - Speed up pipelines

    • Volume caching
    • Dependency caching
    • Docker layer caching
    • Cache invalidation
    • Prerequisites: Advanced pipelines
    • Time: 2 hours
    • Resources: [โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘] 50%
  3. building-docker-images - Build containers in CI

    • Docker-in-Docker
    • BuildKit usage
    • Multi-stage builds
    • Image tagging strategies
    • Pushing to Harbor registry
    • Prerequisites: Docker fundamentals
    • Time: 3-4 hours
    • Resources: [โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘] 70%
  4. testing-automation - Automated test suites

    • Unit tests in pipeline
    • Integration tests
    • Linting and formatting
    • Code coverage
    • Test reports
    • Prerequisites: Testing knowledge
    • Time: 4-5 hours
    • Resources: [โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘] 60%
  5. deployment-patterns - Deploy from CI

    • SSH deployments
    • Docker compose deployments
    • Kubernetes/k0s deployments
    • Blue-green deployments
    • Canary releases
    • Prerequisites: Infrastructure knowledge
    • Time: 4-6 hours
    • Resources: [โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘] 80%

โšซ Phase 5: GitOps & Production (Enterprise-Ready)

  1. gitops-principles - Git as source of truth

    • What is GitOps
    • Git-centric workflow
    • Declarative configuration
    • Reconciliation loops
    • Prerequisites: K8s or infrastructure basics
    • Time: 2-3 hours
    • Resources: [โ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘] 40%
  2. gitops-with-argocd - ArgoCD for k0s

    • ArgoCD installation on k0s
    • Application definitions
    • Sync strategies
    • Self-healing apps
    • Prerequisites: k0s cluster
    • Time: 4-5 hours
    • Resources: [โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘] 80%
  3. monitoring-pipelines - CI/CD observability

    • Pipeline metrics
    • Failed build alerts
    • Slack/Discord notifications
    • Prometheus metrics
    • Grafana dashboards
    • Cross-reference: kb/observability/
    • Prerequisites: CI/CD running
    • Time: 3-4 hours
    • Resources: [โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘] 60%
  4. production-best-practices - Production CI/CD

    • Environment promotion
    • Approval workflows
    • Rollback strategies
    • Security scanning
    • Compliance auditing
    • Prerequisites: Production experience
    • Time: 4-6 hours
    • Resources: [โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘] 90%

๐Ÿ”— What Comes Next?

After mastering CI/CD:

For Infrastructure Automation:

For Container Orchestration:

For Security:

For Monitoring:

๐Ÿ“Š Resource Requirements

Forgejo:

Woodpecker CI Server:

Woodpecker CI Agent (per agent):

Complete Stack (Forgejo + Woodpecker + Agent):

Learning Time Investment:

๐Ÿ› ๏ธ Recommended Tool Stack

Core Stack (Required):

Supporting Tools:

GitOps Tools:

Alternatives to Consider:

๐Ÿ’ก Pro Tips for CI/CD

  1. Start Simple: One repo, one pipeline, manual deploy first
  2. Version Pipelines: Pipeline configs in Git, versioned with code
  3. Fail Fast: Quick feedback loops, fail early in pipeline
  4. Idempotent Builds: Same input โ†’ same output, always
  5. Secrets Never in Git: Use secret management, never commit
  6. Monitor Everything: Pipeline metrics, build times, failure rates
  7. Cache Aggressively: Dependencies, build artifacts, Docker layers
  8. Test Locally: Run pipelines locally before pushing
  9. Document Processes: README with build/deploy instructions
  10. Automate Incrementally: Build โ†’ Test โ†’ Deploy, step by step

๐Ÿ”„ Common Learning Pitfalls

Pitfall 1: Over-Automating Too Soon

Pitfall 2: No Testing in Pipeline

Pitfall 3: Secrets in Git

Pitfall 4: No Rollback Plan

Pitfall 5: Ignoring Pipeline Failures

Pitfall 6: Complex Pipelines

Pitfall 7: No Local Testing

Pitfall 8: Single Agent Bottleneck

๐Ÿ”— Related KB Sections

๐Ÿ“ Change Log

2026-01-30


๐Ÿš€ Remember: CI/CD transforms development workflow. Automating builds, tests, and deployments saves hours daily, catches bugs early, and enables rapid iteration. Start with Forgejo + Woodpecker for privacy, control, and cost-effectiveness!

Change Log

Choose Theme

Your selection is saved locally.

Neural Cacophony
Aperture v2
Flux v1
Mosaic Chaos
Nexus v1
Nexus Zest
Prism v2
Synapse