LoginSignup
5
7

More than 5 years have passed since last update.

GitLabとRedmine連携

Last updated at Posted at 2018-06-29

やりたいこと

gitlabのブランチにpushされたら自動でrdmine上のブランチに反映したい。

公式ページ

gitlab

導入バージョン

10.8.4-ee

公式ページ

Redmine

導入バージョン

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

URLのみ入力
http://redmineのURL/github_hook?project_id=レッドマインのプロジェクト名&repository_id=リポジトリ識別子?key=redmineの管理→設定→リポジトリ→APIkEY

以上で連携ができた。

5
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
7