C.W.K.
Stream
Lesson 13 of 13 · published

Deploy 알림

~8 min · notifications, slack, alerts

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

팀에 뭐가 일어났는지 알려

모든 deploy — 성공이든 아니든 — 팀 커뮤니케이션 채널에 발자국 남겨야. 감사 흐름 중요: '누가 뭐를 언제 ship 했는지' 가 모든 사건 후 첫 질문.

채널

  • Slack — 가장 흔함. Incoming webhook 과 함께 slackapi/slack-github-action 사용. Deploy 채널 pin.
  • Discord — webhook 기반.
  • 이메일dawidd6/action-send-mail 또는 자체 SMTP.
  • Telegram — bot API; curl 호출 한 번.
  • PagerDuty / Opsgenie — 실패 전용, 에스컬레이션 경로.
  • GitHub Deployments — environment scope job 이 이미 생성. Deployments 탭과 PR 에 보임.

유용한 메시지 내용

  1. 서비스 이름 + environment.
  2. Deploy 되는 버전 / SHA.
  3. Trigger 한 actor (사용자 또는 bot).
  4. 결과 (성공 / 실패 / 취소).
  5. Workflow run 링크.
  6. Deploy 된 URL 링크 (검증용).

실패 메시지는 성공보다 더 크게 — 다른 채널, @멘션, 또는 색상.

Code

Deploy 결과에 Slack 알림·yaml
  notify:
    needs: [deploy, smoke]
    if: always()
    runs-on: ubuntu-latest
    steps:
      - name: Notify Slack
        uses: slackapi/slack-github-action@v2
        with:
          webhook: ${{ secrets.SLACK_DEPLOY_WEBHOOK }}
          webhook-type: incoming-webhook
          payload: |
            {
              "text": "${{ job.status == 'success' && '✅' || '🚨' }} *${{ github.repository }}* deploy ${{ needs.smoke.result || needs.deploy.result }}\n"
                       + "Version: <https://github.com/${{ github.repository }}/commit/${{ github.sha }}|${{ github.sha }}>\n"
                       + "Actor: ${{ github.actor }}\n"
                       + "Run: <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|view>"
            }

External links

Exercise

Workflow 하나에 deploy-result 알림 추가. Staging 에서 의도적으로 deploy 실패시키고 실패 메시지에 SHA, actor, run 링크 포함되는지 확인. 그 다음 성공시키고 성공 메시지도 발화하는지 확인.

Progress

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

댓글 0

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

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