FILE: materi-22.module

CI/CD Pipeline

Automate build, test, deploy. GitHub Actions, GitLab CI, Jenkins. Pipeline sebagai code.

RUNTIME: 28m LEVEL: intermediate STATUS: ACTIVE
CODE BUILD TEST DEPLOY PROD CI / CD PIPELINE Continuous Integration / Continuous Deployment

1. Continuous Integration

Setiap commit otomatis di-build dan di-test. Tangkap bug awal. Pre-commit hook untuk basic check. CI server jalan full test suite. Branch protection: tidak bisa merge sebelum CI green.

2. Continuous Delivery vs Deployment

Delivery: otomasi sampai siap deploy, manual button untuk production. Deployment: full otomasi sampai production. Mature org pakai deployment dengan feature flag dan progressive rollout.

3. GitHub Actions

CI/CD platform GitHub built-in. YAML config di .github/workflows. Trigger: push, PR, schedule, manual. Marketplace: ribuan actions reusable. Free untuk public repo.

4. Pipeline Stages

Lint code. Run unit tests. Build artifact (Docker image). Run integration tests. Push artifact ke registry. Deploy ke staging. Smoke test. Deploy ke production. Notify team.

5. Best Practices

Fast feedback (kurang 10 menit). Reproducible (same input = same output). Cache dependencies. Parallel jobs. Secret management. Monitoring pipeline metrics. Rollback strategy.

Practical Mission

  1. Setup GitHub Actions untuk repo
  2. Buat pipeline lint dan test
  3. Build dan push Docker image otomatis
  4. Deploy ke Vercel atau Render via pipeline
  5. Pelajari secrets management

Recap Module