curlでJobの起動を確認
参考: http://blog.kyanny.me/entry/2014/12/20/020700
上記のページを参考に以下のようにcurlでjenkinsのURLを叩く
$ curl -X POST -u user:api_token http://jenkins.example.com/JOB_NAME/build
Jenkins側でビルドが実行されたら疎通確認完了。
svn サーバに post-commit フックスクリプトを仕込む
次に、svnサーバ側に post-commit フックスクリプトを仕込む。
$ cd path/to/repos/hook #リポジトリの格納場所に移動
$ vi post-commit
post-commit の中身には以下のように記述
user={USER}
api_token={USER_API_TOKEN}
job={JOB_NAME}
curl -X POST -u $user:$api_token http://{JENKINS_HOST:PORT}/job/$job/build
{...} の部分は環境に応じて適宜置き換え
これで準備完了。
あとは、svn commit して Jenkins でビルドが実行されたらOK