Travis CI의 빌드 결과를 Slack에 알립니다.
이전 준비
Travis CI 설정
Slack Travis CI integration Setup Instructions에 따라 진행한다.
가장 쉽게 할 때
Integration Settings 의 Post to Channel 에 통지처 channel 을 기재한다 .travis.ymlnotifications:
  slack: <team name>:<token>
token은
Integration Settings의 Token 란에 기재되어 있다.다만, 이대로라면 public인 리포지토리의 경우는 token이 누구에게나 보여 버린다.
Your integration token is semi-secret, but we recommend encrypting your credentials using the Travis command line client.
그렇다고 하기 때문에, 이하의 순서에 따라 token을 암호화한다.
Encryption keys - Travis CI
htps : // / cs. t 등 ご s - 해. 코 m / 우세 r / 엔 cryp 치온 - ys /
travis 패키지 설치 (빌드에
ruby-dev/ruby-devel 필요)$ sudo gem install travis
token 암호화된 명령 실행:
travis encrypt "<Slack team name>:<Slack API token>" --add notifications.slack
Building native extensions.  This could take a while...
ERROR:  Error installing travis:
        ERROR: Failed to build gem native extension.
    /usr/bin/ruby2.1 extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
헤더가 없으면 화가 났으므로 설치.
$ sudo apt install ruby-dev
다시 실행하고 성공하면
.travis.yml에 다음 Slack 알림 항목이 추가됩니다.notifications:
  slack:
    secure: 
        XXX/XXX...
리포지토리의 정보를 보는 것 같으므로 각 리포지토리에서 개별적으로 실행해야합니다.
마지막으로 대상 리포지토리에
.travis.yml를 커밋합니다.알림 결과
올바르게 알림 설정이 되어 있는 상태에서 빌드가 성공하면 ↓과 같이 Slack 채널에 통지해 준다:
 
Reference
이 문제에 관하여(Travis CI의 빌드 결과를 Slack에 알립니다.), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/vmmhypervisor/items/b6cd3f8db7b434fbb933텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
                                
                                
                                
                                
                                
                                우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)