jenkinsとgithubを連携して自動テストをする
web上にいろいろ情報が錯綜していていろいろハマったので成功したやりかたをメモしておく
やりたいこと
- githubに新しいcommitがpushされるごとにそのソースコードをビルドしてテストする
- テスト結果をgithub上から確認できるようにする
github側の設定
- ビルドしたいレポジトリにwebhookを設定する
- settings -> webook
- pyload url
- content type
- application json
- Which events would you like to trigger this webhook?
- "Just the push event." or "Send me everything."
- settings -> webook
- access tokenの設定
- 個人アカウントのsettings -> developer settings -> personal access token
- generate new token
- repoとadmin:repo_hookをチェック
- 個人アカウントのsettings -> developer settings -> personal access token