C.W.K.
Stream
Lesson 02 of 12 · published

Continuous Delivery 와 Continuous Deployment

~14 min · cd, delivery, deployment

Level 0Apprentice
0 XP0/101 lessons0/10 achievements
0/120 XP to next level120 XP to go0% complete

같은 글자, 다른 약속 두 개

CD 는 의도적으로 overloaded 야. 같은 두 글자가 두 가지 다른 걸 뜻해. 그리고 그 차이는 대부분의 팀이 인정하는 것보다 훨씬 중요해.

  • Continuous Delivery — CI 를 통과한 모든 commit 이 자동으로 packaging 되고 versioning 되고 deploy 할 준비가 돼. 그래도 사람이 버튼을 누르거나 release ticket 을 승인해야 prod 에 닿아.
  • Continuous Deployment — CI 를 통과한 모든 commit 이 자동으로 prod 에 deploy 돼. 사람 없음. Pipeline 자체가 deploy 버튼이야.

둘 다 밑에 작동하는 CI 가 필요해. Delivery 는 쉬운 약속이야: 지금 ship 하고 싶으면 이 commit 을 ship 할 수 있어. Deployment 는 어려운 약속이고: 지금 이 commit 을 ship 하고 있어, test suite + rollback plan 이 그 결정을 걸 만큼 충분히 좋아.

어느 쪽을 진짜 원해?

Deployment 가 화려하고 대부분의 팀은 정직하게 그걸 못 해. Delivery 가 현실적인 목표야 — test coverage, observability, rollback 스토리가 성숙할 때까지는. 잘못 고르는 거 — pipeline 이 사실은 Delivery 인데 Deployment 라고 주장하는 거 — 가 outage 사는 곳이지.

Code

Delivery — artifact 빌드 후 수동 승인 gate·yaml
name: cd-delivery
on:
  push:
    branches: [main]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: ./build.sh
      - uses: actions/upload-artifact@v4
        with:
          name: dist
          path: dist/
  deploy:
    needs: build
    runs-on: ubuntu-latest
    environment: production   # requires approval
    steps:
      - uses: actions/download-artifact@v4
        with: { name: dist }
      - run: ./deploy.sh
Deployment — 수동 gate 없이 push 가 live 로·yaml
name: cd-deployment
on:
  push:
    branches: [main]
jobs:
  ship:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: ./test.sh
      - run: ./deploy-to-prod.sh

External links

Exercise

Ship 하는 프로젝트 하나에 대해: Delivery 야 Deployment 야 적어. 그 다음 prod 를 막는 정확히 어떤 step 인지 (그리고 사람이 있다면 누구인지) 목록으로 적어. 사람을 빼도 될 만큼 CI 를 진짜 신뢰하는지 정직하게 봐.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.