[jenkins & slack] jenkins & slack 연동 (with pipeline)

2019. 12. 5. 19:50개발/OVPS

반응형

jenkins & slack 연동

  1. Slack 에서 우측 하단의 +Add more apps 에서 jenkins 검색 후 설치

  2. jenkins와 slack를 연동 할 채널 선택

  1. Setup Instructions 단계 중 Step3에 나와 있는 Integration Token Credential ID 기억 해두기(jenkins 연동에 필요)

  2. jenkins 접속 > jenkins 관리 > 시스탬 설정 이동 및 Slack 텝 설정

    • Default channel : 위에서 선택 한 채널 명

    • Override url : https://{본인slack도메인}.slack.com/services/hooks/jenkins-ci/

  • Credential 설정

    • kind: Secret text
    • secret: 위에서 기억해 둔 Integration Token Credential ID
  1. 실제 소스(jenkinsfile) 에 slack 알람 설정
- slackSend:: slack 으로 알람 시작 - color: 알람에 앞에 붙은 색깔( 변경가능) - message: 실제 메시지 (자유롭게 작성 가능 (변수도 가능)
  1. Slack 연동 확인

반응형