やりたいこと
gitlabのブランチにpushされたら自動でrdmine上のブランチに反映したい。
公式ページ
導入バージョン
10.8.4-ee
公式ページ
導入バージョン
3.4.6
サーバー
CentOS7
サーバーの設定
サーバーでbareリポジトリの作成
公式ガイド
サーバーにmkdirでフォルダを作ってね!
作ったフォルダに移動してクローン
git clone --bare http://userId:Password@gitLabUrl/root/xxxxx.git xxxxx.git!
フォルダのpermissionの設定も忘れずに!
忘れると
GithubHook: Command 'git fetch origin' didn't exit properly. Full output: ["error: cannot open FETCH_HEAD: Permission denied\n", "\n"]
こんなエラーがくる
Redmineの設定
下記ページに移動
プロジェクト内→設定→リポジトリ
新しいリポジトリ→バージョン管理システムgitを選択
識別子を記入
リポジトリのパスを入力(上記で作成したフォルダのpath)
ファイルとディレクトリの最新コミットを表示するにチェック
GitLabの設定
GitLabの設定
下記ページまで異動しWebhooks を設定
http://GitLabUrl/プロジェクト/settings/integrations
以上で連携ができた。