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

Pipeline 해부도

~14 min · anatomy, stages, gates

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

Stage, gate, environment

Pipeline 은 그냥 'push 시 돌아가는 script' 가 아니야. stage 의 directed graph 야 — gate 로 분리되고, 하나 이상의 environment 에서 끝나.

Classic 해부도:

  • Source — checkout. 처리할 정확한 commit.
  • Build — compile, bundle, containerize. 출력은 artifact — 결정적이고 이름 있고 immutable 한 물건.
  • Test — unit, integration, acceptance. 보통 병렬화.
  • Static analysis — lint, type-check, security scan, license scan.
  • Package — deploy 용 artifact 조립 (Docker image, npm tarball, wheel).
  • Deploy → staging — 보통 자동.
  • Acceptance / smoke test staging 대상.
  • Deploy → production — Delivery: 승인 gate. Deployment: 자동.
  • Post-deploy 검증 — prod smoke test, observability check.

모든 프로젝트가 모든 stage 가 필요하지는 않아. Static 사이트는 build/package/deploy 를 하나로 합칠 수 있고. 규제 받는 은행 앱은 5 개 더 추가할 수 있어 (compliance scan, change advisory board 승인, audit log emission). 모양은 항상 artifact 둘레의 gate graph 야.

Code

두 environment pipeline (staging → production)·yaml
name: pipeline
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/ }

  test:
    needs: build
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: ./test.sh

  deploy-staging:
    needs: [build, test]
    runs-on: ubuntu-latest
    environment: staging
    steps:
      - uses: actions/download-artifact@v4
        with: { name: dist }
      - run: ./deploy.sh staging

  deploy-prod:
    needs: deploy-staging
    runs-on: ubuntu-latest
    environment: production    # gated
    steps:
      - uses: actions/download-artifact@v4
        with: { name: dist }
      - run: ./deploy.sh prod

External links

Exercise

현재 프로젝트의 pipeline 을 graph 로 스케치해. 각 stage, 각 gate (수동 또는 자동), 각 environment 표시해. Staging 과 production 이 artifact 를 따로 rebuild 하면 'build once' 위반으로 표시하고 뭘 바꿀지 적어.

Progress

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

댓글 0

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

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