how to effectively cross jira and svn
The initial task is that we want to connect the commits in SVN with JIRA tickets, moreover:
1. Commits should not be skipped without really existing tickets in Jira
2. Directly in Jira should be able to see what (who, when ...) in SVN to the context of a particular ticket.
As it turned out, it’s not so easy to google info on this topic. There are a lot of jira pre-commit hooks solutions, but only one (maybe there are others?!, But I did not find) allows us to solve the problem of “really existing tickets in Jira”. And so the decision ...
On the first task.
JIRA Commit Acceptance Plugin
Installation described there. The only thing missing:
- do chmod + x on scripts
- ln -s pre-commit.sh pre-commit
- Why didn’t you smell the Python script, pearl barley like a glove?
- Do not forget to add your paths + settings to the scripts (both ways)
- Read the docks to the end!
Than it is better just svn hooks. This hook asks Jira (via RPC), and does not draw conclusions on a regular basis. Accordingly, all settings are done through the Jira admin panel:
- for which projects to enable hooks
- whether to ban commits to closed tickets
- whether to ban commits if the author of the commit and the ticket executor are different.
According to the second.
JIRA Subversion Plugin
Everything is simple here, only:
- Pay attention to the table of correspondence between the plugin and Jira versions
- Install WebSVN or an analogue (not necessary if you do not need to watch the file in the browser)
- To rebuild indexes from SVN, you need to delete the / plugins / atlassian-subversion-revisions / folder (note, not only files)
1. Commits should not be skipped without really existing tickets in Jira
2. Directly in Jira should be able to see what (who, when ...) in SVN to the context of a particular ticket.
As it turned out, it’s not so easy to google info on this topic. There are a lot of jira pre-commit hooks solutions, but only one (maybe there are others?!, But I did not find) allows us to solve the problem of “really existing tickets in Jira”. And so the decision ...
On the first task.
JIRA Commit Acceptance Plugin
Installation described there. The only thing missing:
- do chmod + x on scripts
- ln -s pre-commit.sh pre-commit
- Why didn’t you smell the Python script, pearl barley like a glove?
- Do not forget to add your paths + settings to the scripts (both ways)
- Read the docks to the end!
Than it is better just svn hooks. This hook asks Jira (via RPC), and does not draw conclusions on a regular basis. Accordingly, all settings are done through the Jira admin panel:
- for which projects to enable hooks
- whether to ban commits to closed tickets
- whether to ban commits if the author of the commit and the ticket executor are different.
According to the second.
JIRA Subversion Plugin
Everything is simple here, only:
- Pay attention to the table of correspondence between the plugin and Jira versions
- Install WebSVN or an analogue (not necessary if you do not need to watch the file in the browser)
- To rebuild indexes from SVN, you need to delete the / plugins / atlassian-subversion-revisions / folder (note, not only files)