Infra2024년 12월 18일1분 읽기

CI/CD 파이프라인 설계 — 최적의 배포 전략

YS
YoungSam
조회 519

배포 전략 비교

  • Blue-Green: 두 환경을 전환. 즉각 롤백 가능
  • Canary: 소수 트래픽으로 먼저 검증
  • Rolling: 점진적으로 인스턴스 교체

GitHub Actions 파이프라인

name: Deploy
on:
  push:
    branches: [main]
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npm ci && npm test
  deploy:
    needs: test
    runs-on: ubuntu-latest
    steps:
      - run: ssh deploy@server "cd /app && git pull && pm2 reload all"
CI/CDDevOpsDeployment

댓글 0

아직 댓글이 없습니다.