【指导】使用its-jira插件关联gerrit和JIRA

【准备】

1,its-jira插件:

官网地址(需要翻墙):https://gerrit-review.googlesource.com/#/admin/projects/plugins/its-jira

gerrit-ci地址(按版本下载,比如2.14的):https://gerrit-ci.gerritforge.com/view/Plugins-stable-2.14/job/plugin-its-jira-bazel-master-stable-2.14/lastSuccessfulBuild/artifact/bazel-genfiles/plugins/its-jira/its-jira.jar

2,触发条件配置文件:etc/its/actions-its-jira.config(或者)

安装插件后参考配置文档自己创建即可:http://your.gerrit_review_site.com/plugins/its-jira/Documentation/config-rulebase-common.md

写在这里是提醒不要忘了,不然是无法生效的。


【安装插件】

$ ssh -p 29418 localhost gerrit plugin install -n its-jira.jar - <its-jira.jar

参考:http://blog.csdn.net/cuiaamay/article/details/49994541


【配置插件】

1,安装时配置:

$ java -jar gerrit.war init -d review_site

最后一步:

*** Jira connectivity
*** 
Jira URL (empty to skip)      : http://your.jira.com
Jira username                    []: admin
admin's password               : 
              confirm password : 
Test connectivity to http://your.jira.com [y/N]? y
Checking Jira connectivity ... [OK]


*** Jira issue-tracking association
*** 
Jira issue-Id regex            [([A-Z]+-[0-9]+)]: 
Issue-id enforced in commit message [SUGGESTED/?]:


*** Jira Integration
*** 
Issue tracker integration for all projects? [DISABLED/?]: enabled
Branches for which the issue tracker integration should be enabled (ref, ref pattern or regular expression) [refs/heads/*]: 
Initialized /home/gerrit/review_site

2,直接修改配置文件,添加:

gerrit.config:

[its-jira]
  url = http://your.jira.com
  username = admin
[commentlink "its-jira"]
  match = ([A-Z]+-[0-9]+)
  html = <a href=\"http://your.jira.com/browse/$1\">$1</a>
[plugin "its-jira"]
  association = SUGGESTED

secure.config:

[its-jira]
  password = YourJiraAdminPass


【配置触发条件】

$ vi etc/its/actions-its-jira.config

如:

[rule "rule1"]
    event-type = change-merged
    action = add-standard-comment
[rule "rule2"]
    event-type = comment-added
    approval-Code-Review = -2,-1
    action = add-comment Oh my Goodness! Someone gave a negative code review in Gerrit on an associated change.

阅读更多
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/cuiaamay/article/details/78285995
个人分类: Gerrit JIRA
上一篇【FAQ】License for package ConstraintLayout for Android 1.0.2 not accepted
下一篇【指导】markdown 转 html
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭
关闭