Skip to content

hobbs/jirret

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

Gerrit hooks.

  • update JIRA issue
  • Require JIRA Version >= 7.0.0

Installation Steps

  • copy dist/grrit-jira-hook.tar to Gerrit instance server
# wget https://github.com/sintonwong/jirret/releases/download/v0.2/gerrit-jira-hook.tar.gz
  • install dependencies and copy hooks to gerrit install path
   # mkdir install
   # tar -xzvf gerrit-jira-hook.tar.gz -C install
   # cd install
   # chmod +x install.sh
   # GERRIT_PATH=<gerrit_install_path> ./install.sh
  • config file. Edit config file at hooks/jira-hook.config.
  • check gerrit permission.
# ssh -p 29418 admin@localhost gerrit

How it works:

1. Modify the “jira-hook.config” file.

[jira]

#username for jira user
user=admin

#passowrd for jira user
pass=admin

#URL to jira instance api calls (http://<domain>)
url=http://localhost:8080

# the command that is used to ssh into the gerrit sshd
gerritcmd=ssh -p 29418 admin@localhost gerrit

# If you create a custom field for "Gerrit status", put the numeric ID
# here.  The ID is found from the URL when editing that custom field.
# if set, it will set it to "pending" when a patch is uploaded, and "merged"
# when it is merged 
custom_field=

# optional comma separated list of jira projects
# two or more projects seperate with ","
projects=HELLOWORLD

# Set to 'true' if you'd like Jirret to search for Gerrit tracking IDs rather
# than in the subject line for your issue IDs
use_trackingid=false

# Set to false to disable {quote} markers surrounding comments
enable_quotes=true

2. Create a single user in JIRA and permit it to create comment on JIRA Issues.

3. Check gerrit permission.(add user’s pub key to Gerrit)

# ssh -p 29418 admin@localhost gerrit

4. In the user-end, the operation should like this:

# git add .
# git commit -s
		## remember change prjkey-id to real issue's id.
		add new feature.
		JIRA:prjkey-id
# git push origin HEAD:refs/for/master

5. All log saves in “hooks.log”, make it writable!

# chmod 755 hooks.log

More Links Related:

About

Gerrit hooks to update JIRA

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages