Yazılım9 dk·

CI/CD: GitHub Actions, GitLab CI Pratik Rehber 2026

Continuous Integration ve Continuous Deployment yapılandırması. GitHub Actions, GitLab CI, automated test ve deployment workflow.

CI/CDGitHub ActionsGitLabDevOps
CI/CD: GitHub Actions, GitLab CI Pratik Rehber 2026

CI/CD, modern yazılım gelişiminin sırtı. Her commit otomatik test → kalite kontrol → staging deploy → production. Manuel deploy yapan ekipler 2026'da hâlâ varsa rekabet edemiyor.

CI vs CD

CI (Continuous Integration)
Her commit'te otomatik build + test.
CD (Continuous Delivery)
Test geçen kod staging'e otomatik deploy.
CD (Continuous Deployment)
Production'a otomatik deploy (insan onayı yok).

Popüler platformlar

  • GitHub Actions — GitHub repo'larında native, 2000dk/ay ücretsiz
  • GitLab CI — GitLab dahili, runner self-host kolay
  • CircleCI — eski popüler, performans odaklı
  • Jenkins — open source veteran, self-host
  • Bitbucket Pipelines — Atlassian
  • Vercel/Netlify built-in CI — frontend için yeterli

GitHub Actions örneği

`.github/workflows/ci.yml` dosyası ile yaml-tabanlı yapılandırma. Trigger (push, PR) → job'lar → step'ler. Marketplace'te 10K+ pre-built action.

Tipik workflow

  1. 01Trigger: push to main or PR
  2. 02Checkout — repo'yu clone et
  3. 03Setup — Node.js, Python, vs. install
  4. 04Cache — node_modules, build cache restore
  5. 05Install — dependencies
  6. 06Lint — ESLint, Prettier
  7. 07Type check — TypeScript tsc
  8. 08Test — unit + integration
  9. 09Build — production artifact
  10. 10Deploy — staging veya production

Test pyramid

  • Unit tests (en çok, en hızlı) — function level
  • Integration tests — API + DB
  • E2E tests (en az, en yavaş) — gerçek tarayıcı (Playwright, Cypress)

Deployment stratejileri

Blue/Green
İki paralel env, switch yap. Zero downtime.
Canary
Yeni versiyonu %5 trafiğe aç. Kademeli.
Rolling
Pod by pod güncelle. K8s default.
Feature flag
Kod prod'da ama özellik kapalı. LaunchDarkly, GrowthBook.

Secret yönetimi

  • GitHub Secrets — repo veya organization seviyesi
  • HashiCorp Vault — enterprise secret store
  • AWS Secrets Manager / Parameter Store
  • Doppler — cross-platform secret sync
  • Asla .env'i commit'leme — .gitignore'a ekle

Cache strateji

  • Dependency cache (node_modules, .pnpm-store) — build 5-10x hızlı
  • Docker layer cache — multi-stage build
  • Next.js build cache — incremental builds
  • Test result cache — Turborepo, Nx

Monorepo CI

Turborepo, Nx, Lerna ile büyük monorepo'larda sadece değişen paket'ler test edilir. 50 paketten 3'ü değişti → 3 paket test, diğerleri skip. CI süresi %80 azalır.

Şunu yapmayın: tüm CI/CD'yi tek workflow'da yapmak

1000 satırlık yaml dosyası bakımı kabus. Reusable workflow'lar (GitHub Actions) veya composite action ile modülerleştir.

NotCI/CD kurulum + best practice: +90 537 729 40 97 (WhatsApp). 1 haftada full pipeline canlıya.

Sıkça sorulan sorular

Küçük projeler için GitHub-hosted (2000dk/ay ücretsiz). Büyük build/test workload için self-hosted (kendi Docker, daha hızlı + ucuz).
wty
Web Tasarım Yazılım
İstanbul Bahçeşehir merkezli dijital stüdyo
Son güncelleme · 9 Nisan 2026
İlk strateji toplantısı bizden

Dijitalde sıradan değil,
ölçülebilir bir sistem kuralım.

Web, SEO, reklam ve AI altyapısını markanız için sıfırdan tasarlayalım. Brief alalım, kapsam belirleyelim, üretelim.

Bu konuyu birlikte konuşalım

İlk strateji toplantısı ücretsiz.