GitLabã¨Redmineãé£æºãã¦ã¿ãã®å·»
ã¯ã¦ãªããã°ããã®éçºããã¼ã®ã話
å°ãåã®è©±ã«ãªããã§ãããGitHubKaigiã§
ã¯ã¦ãªããã°ããã®éçºããã¼ã«ã¤ãã¦çºè¡¨ãããã¾ããã
ãã®ä¸ã§
å½åã¯GitHubã¨Redmineãä½µç¨ãã¦ãããã 両ãã¼ã«ã®é£æºãã¤ãã¤ãã ã£ãã®ã§ Redmineãæ¢ãã¦ãã¯ã¤ããã¼ãã§ã¿ã¹ã¯ç®¡çããããã«ãã
ã¨ããå
容ãããã¾ããã
https://speakerdeck.com/shibayu36/hatenaburogutimufalsekai-fa-hurotogithub
ããµããµãããªãã»ã©ãªããã¨ããæãã§é常ã«åå¼·ã«ãªã£ãã®ã§ããã
ãããããã
ã"GitLabï¼Redmine" ãªããã¼ã«èªä½ãé£æºæ©è½ãæã£ã¦ããã
ã®ã§ããå°ããã·ã«ãªãã®ããï¼ã¨ãæãã¾ããã
ããã§ãGitLabã¨Redmineã使ãã¨
ä¸ä½ã©ããããã¨ãåºæ¥ãæ§ã«ãªãã®ãï¼ã¨ãã£ãã¨ãããç´¹ä»ãã¦ã¿ã¾ãã*1
å¼ç¤¾ã§ãé£æºæ©è½ã¯ä¸å¿æå¹ã«ãã¦ãããã§ããã
ã¾ã ã¾ã¨ãã«ã¯éç¨ãã¦ããªãã®ã§
å確èªã®æå³ã§ã¡ã¢ãæ®ãã¦ããããã¨ããæå³ãããã¾ãï½
TL;DR
ãããã®è¨å®ãè¡ãã¨â¦
- GitLabã®Issuesã¿ããRedmineã®Issuesã¿ãã¨ãªã³ã¯ããã¾ã
- GitLabã®ã³ãããã¡ãã»ã¼ã¸å ã®issueçªå·ãRedmineã®issueã¨ãªã³ã¯ããã¾ãï¼â»6.9.2æç¹ã§ã¯ããããå¿ è¦ï¼
- Redmineã®ãã±ããé£æºæ©è½ããã®ã¾ã¾ä½¿ãã¾ã
- ãã®ä»ãRedmineã®ä¾¿å©ãã©ã°ã¤ã³ã¨ãé£æºã§ãã¾ã
äºåè¨å®: Redmine
Github Hookãã©ã°ã¤ã³ãå°å ¥ãã¦ãã
GitHubã¨ããååã§ãããGitLabã§ãåãããã«ä½¿ãã¾ãã
ã¤ã³ã¹ãã¼ã«ã¯ããªãã¸ããªãã¦ã³ãã¼ãã㦠bundle install ããã ãã§OKã§ãã
https://github.com/koppen/redmine_github_hook
äºåè¨å®: GitLab
Issue Trackerã§Redmineé£æºãé¸æã§ããããã«ãã¦ãã
gitlab.ymlã«Redmineé£æºããããã®è¨è¿°ããã¦ããå¿
è¦ãããã¾ãã
ãã®è¨å®ããã¦ããã¨ãSetting㧠IssueTracker ã«Redmineãé¸æã§ããããã«ãªãã¾ãã
RPMインストールãã¦ããã®ã§ããã°ã
/etc/gitlab/gitlab.rb ã«ä»¥ä¸ã®è¨è¿°ã追è¨ããã ãã§OKã§ãã
gitlab_rails['issues_tracker_redmine'] = true gitlab_rails['issues_tracker_redmine_title'] = "Redmine" gitlab_rails['issues_tracker_redmine_project_url'] = "http://<redmine_url>/projects/:issues_tracker_id/issues" gitlab_rails['issues_tracker_redmine_issues_url'] = "http://<redmine_url>/issues/:id" gitlab_rails['issues_tracker_redmine_new_issue_url'] = "http://<redmine_url>/projects/:issues_tracker_id/issues/new"
RedmineããGitLabãªãã¸ããªã«ã¢ã¯ã»ã¹åºæ¥ãããã«ãã¦ãã
ããã¯ç°å¢ã«ãã£ã¦ãããã¨ãç°ãªãã®ã§ããã
ãããGitLabã¨Redmineãåããµã¼ãã§ããã°
GitLabãªãã¸ããªã¸ã®Permissionãé©åã«è¨å®ããã¦ããã°ããã§ãããã
RPMインストールãã¦ããã®ã§ããã°ã
/var/opt/gitlab/git-data/repositories 以ä¸ã«ãªãã¸ããªã®å®ä½ãããã¾ãã
Redmineãå®è¡ãã¦ããã¦ã¼ã¶ããããã®ãã£ã¬ã¯ããªãè¦ãããã©ãã確èªãã¦ããã¾ãããã
GitLabã¨Redmineå¥ã
ã®ãµã¼ãã®å ´åã詳細ã¯å²æãã¾ãã
GitLabã®webhookãé§ä½¿ãã¦Redmineã®ãªãã¸ããªã«åæ ããã°è¯ãã§ãããã
ããã¸ã§ã¯ãçºè¶³æãGitLabã¨Redmineãé£æºããããã®æä½éã®è¨å®
ã¾ããããã¸ã§ã¯ããç«ã¡ãããæã«
æä½éããã¹ããã¨ããªã¹ãåãã¦ã¿ã¾ãã
- Redmine
- ããã¸ã§ã¯ãä½æ
- a) Gitãªãã¸ããªæ å ±ãè¨å®
- GitLab
- ããã¸ã§ã¯ãä½æ
- b) Settingã§issue_trackerã"Redmine"ã«å¤æ´ãã
- c) Settingã§ãªãã¸ããªã®æ´æ°ãéç¥ããããã®webhookãè¨å®ãã
a) Redmine: Gitãªãã¸ããªæ å ±ãè¨å®
ããã¸ã§ã¯ãâè¨å®âãªãã¸ã㪠ãããé常éãgitãªãã¸ããªã®å ´æãè¨å®ãã¾ãã
b) GitLab: Settingã§issue_trackerã"Redmine"ã«å¤æ´ãã
ããã¸ã§ã¯ãâSettingããissue_trackerã"Redmine"ã«è¨å®ãã¾ãã
project_idã«ã¯ãRedmineã®project_idãå
¥åãã¾ãããã
c) GitLab: Settingã§ãªãã¸ããªã®æ´æ°ãéç¥ããããã®webhookãè¨å®ãã
ãã®è¨å®ãè¡ãã¨ãGitLabãªãã¸ããªã«pushããã¿ã¤ãã³ã°ã§
Redmineã®ãªãã¸ããªæ
å ±ããªã¢ã«ã¿ã¤ã ã§æ´æ°ããã¾ãã
Hook URLã®ãã©ã¼ãããã¯ãã¡ãâ
<redmine_url>/github_hook?project_id=<Redmineã®ããã¸ã§ã¯ãID>
ä¸ä½ä½ãé£æºãããã®ï¼
GitLabã®Issueã¿ããRedmineã®Issueã¿ãã¨ãªã³ã¯ãã
GitLabãµã¤ãä¸ã® "Issuesã¿ã" ãRedmineã®Issuesã«ç§»åãã¾ãã
GitLabã³ãããã¡ãã»ã¼ã¸ã®issueçªå·ãRedmineã®issueã¨ãªã³ã¯ãã
ã³ãããã¡ãã»ã¼ã¸ã®ã#????ãã¨ããé¨åããRedmineã®Issueã«ãªã³ã¯ãã¾ãã
ãã ãå°ãåã®ãã¼ã¸ã§ã³ã§ã¯æ®éã«Redmineãã±ããã¸ã®ãªã³ã¯ããã¦ããã®ã§ããã
ç¾ãã¼ã¸ã§ã³(6.9.2)ã§ã¯Redmineã®ãã±ããã®ãªã³ã¯ãä¸æãä½æãããªãããã§ãã
ãªã³ã¯ã復活ãããã«ã¯ $RAILS_ROOT/lib/gitlab/markdown.rbのこの行ã«
以ä¸ã®ãããªã¢ã³ãã¼ããããå½ã¦ã¾ãã*2
--- a/lib/gitlab/markdown.rb +++ b/lib/gitlab/markdown.rb @@ -178,7 +178,7 @@ module Gitlab end def reference_issue(identifier, project = @project) - if project.used_default_issues_tracker? || !external_issues_tracker_enabled? + if true if project.issue_exists? identifier url = url_for_issue(identifier, project) title = title_for_issue(identifier)
ããããããJIRAé£æºã追å ããæã®ãã°ã ã¨æãã®ã§ãã
è±èªåã足ããªãã¦ä¼ããããæ°ãããªãâ¦
Redmineã®ãã±ããé£æºæ©è½ããã®ã¾ã¾ä½¿ãã
ãã¨ãã°ãIssueに紐づくコミットの表示や、ステータスの変更/進捗率の変更ãªã©ã
ã³ãããã¡ãã»ã¼ã¸ããè¡ããã¨ãåºæ¥ã¾ãã
ã¾ãã作業時間の連携もè¡ãã¾ãã®ã§
ã³ãããã¡ãã»ã¼ã¸ã«è¨å®ããä½æ¥æéããã±ããã«åæ ããã
ãã®ã¾ã¾ä½ãããªãã¦ãããã¸ã§ã¯ãæ¯ï¼ã¦ã¼ã¶æ¯ã®éè¨çµæã«åæ ããã¾ãã
å®ç¸¾ç®¡çãè¡ã£ã¦ããããã¸ã§ã¯ãã§ã¯ã¨ã¦ã便å©ã§ããã*3
ããã·ã¥ãã¼ã/ã¹ã¯ã©ã éçº ãã©ã°ã¤ã³
å
ã®ã¹ã©ã¤ãã§ã¯ããã°ãã«ã¤ãã¦ãè¨åããã¦ãã¾ããã
ããã§ãRedmineã§ãåããããªãã¨ãå®ç¾ããããã®ãã©ã°ã¤ã³ãç´¹ä»ãã¦ã¿ã¾ãã
- ã¹ã¯ã©ã éçºãæ¯æ´ãããã
- ãã±ãããããã°ãã§è¡¨ç¤ºãããã
- ãã©ãã°ã¢ã³ãããããã§ç´æçã«ãã±ãããæä½ãããã
ã¨ãã£ãæ©è½æ¡å¼µãæä¾ãããã®ã§ãã
ä»ã«ãåããããªãã©ã°ã¤ã³ãããã¤ãåå¨ãã¾ãããæ´æ°ãæ´»çºãªãã®ãå³é¸ãã¾ããã
Redmine Backlogs v1.0.6
Redmineã§ã¹ã¯ã©ã éçºãæ¯æ´ããããã®ãã©ã°ã¤ã³ã§ãã
Redmineã¦ã¼ã¶ã®ä¸ã§ã¯å²ã¨ã¡ã¸ã£ã¼ãªæ°ããã¾ãã
以ä¸ãRedmineã®Backlogãå©ç¨ããè¨äºã§ãã
Redmine Dashboard2
ããã¸ã§ã¯ãæ¯ã®ã¿ã¹ã¯ãã¼ããæä¾ãã¾ãã
å°å
¥ãããªã楽ã§ãããè¦ãç®ï¼æä½ãããããããã®ã§
åç´ã«ãã±ããã®ããã°ãã欲ããã ããªããªã¹ã¹ã¡ã
â»ä»¥ä¸ãGifzoã§æä½æãåç»ã«ãã¦ã¿ã¾ãã
http://gifzo.net/l4gxyO45rI.mp4
Redmine ekanban
ãã¡ããã¿ã¹ã¯ãã¼ããæä¾ãããã©ã°ã¤ã³ã
ãã¢ãµã¤ãããã
http://ekanban-demo.herokuapp.com/
account: guest
password: redmine
ãã®ä»é£æºãã©ã°ã¤ã³
Redmine OmniAuth
GitLabã®OmniAuthã§Redmineã追å ãã¾ãã
ãã¡ããå°å
¥ããã¨ãGitLabã®ã¢ã«ã¦ã³ã管çãRedmineã¢ã«ã¦ã³ãã«éç´ãããã¨ãåºæ¥ã¾ãã
è¨å®æé ã¨ãã¦ã¯ä»¥ä¸ã®éãã§ãã
- RedmineにOAuthProviderプラグインãå°å ¥
- GitLabのOmniauthè¨å®ãè¡ã
å¼ç¤¾ã§ãè¨å®æ¸ã¿ã§ãããå°å
¥ã«çµæ§æéåã£ãè¨æ¶ãâ¦ï¼â»å¾ã§è¿½è¨ãããããããªãï¼
Redmine_Gitlab_Merge_Request
Redmineããmerge_requeståºæ¥ããªã³ã¯ããã±ãã詳細ã«è¿½å ããã¾ãã
ã¡ãã£ã¨å¾®å¦ããã
ã¾ã¨ã
GitLabã¨Redmineãé£æºããããã®è¨å®ã¨ã
é£æºããã¨ã©ããã£ããã¨ãåºæ¥ããã
ãæ¸ãã¦ã¿ã¾ããã
ãã¡ããããã®æ©è½ã使ãã°ä½ã§ã解決ãã¾ãï¼ãã¨ãããã¨ã§ã¯ãªãã
ããããããæ¹ããããã ãªããã¨ãããããæãã§
é¸æè¢ã®ä¸ã¤ã«ãã¦ããã ããã°ã¨æãã¾ãã
*1:GitHubã§ã¯ãªãã¦æ縮ã§ããâ¦
*2:RPMã¤ã³ã¹ãã¼ã«ãã¦ããã®ã§ããã°ããã¡ãã®ãã¡ã¤ã«ã«ãªãã¾ã > /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/markdown.rb
*3:Redmineã®è¨å®ã§ããªãã¸ããªã¦ã¼ã¶ã¨Redmineã¦ã¼ã¶ã®ç´ä»ããå¿ããã«ï¼ http://blog.redmine.jp/articles/new-feature-1_1/automatic-spent-time-logging/