Jira Version Generator
Bitbucket Server (post receive hook) plugin that generates Jira version and links issues to the version.
Contents
- News
- Requirements
- Installation
- Usage
- Features
- Contributing
- Useful Atlassian Plugin SDK commands
- Credits
- License
News
2.0.1
Upgrade to Bitbucket Server 6.5.1.
For previous changes see the changelog.
Requirements:
- Bitbucket Server has an application link with a Jira instance.
- User that commits the release commit exists on Jira and has rights to create the version and modify issues on the project.
By default, each commit on the repository is checked against the Maven Release Plugin release commit message pattern: \[maven-release-plugin\] prepare release repositoryName-(?<version>.*)
. This behavior can be changed by changing the release commit version pattern.
If the commit message matches the pattern, following actions are taken:
- Version is extracted from the commit message
- Jira issue keys are extracted from older commits in that branch until commit that matches the pattern is encountered
- Jira version is created
- Jira issues are linked to the Jira version
If the version already exists on Jira, the version will not be created and issues will not be linked to the version.
Installation:
Simply download latest jar from the Maven Central here and install it on your Bitbucket Server instance.
Usage:
Jira version generator plugin needs to be activated for each repository:
JIRA project key parameter is required. Only issues with that project key will be updated on JIRA, others will be ignored.
JIRA version prefix is optional. See Version prefix for more information about this parameter.
Features:
Core:
The core feature of this plugin is to extract information about releases from commit messages. For example, given the current state of the repo is
when a new commit arrives with a message [maven-release-plugin] prepare release my-test-project-1.0.0
the plugin generates the version 1.0.0 for the project and tags MTP-1, MTP-2 and MTP-3 issues with fix version 1.0.0.
Release commit version pattern:
Optional configuration setting, default value is \[maven-release-plugin\] prepare release repositoryName-(?<version>.*)
.
Used to extract release message from a commit. Must contain named capturing group with name "version". Default pattern matches the maven release plugin release commit message with the repository name as artifactId.
Version prefix:
Optional configuration setting, default value is ""
.
Version prefix defines a static prefix that will be applied to every version created on JIRA. For example, for version prefix defined as
release version will look like
Contributing
If you have an idea for a new feature or want to report a bug please use the issue tracker.
Pull requests are welcome!
Useful Atlassian Plugin SDK commands (for development)
atlas-clean
- similar to mvn clean, removes local instances of products (Bitbucket Server, Jira)atlas-debug
- runs the project product (Bitbucket Server) in debug mode, guide for remote debuggingatlas-run-standalone --product jira -v 6.4
- runs local Jira instance of version 6.4
Credits
The original project (before open sourcing) was conceived by Marko Bjelac and the implementation and bug fixes were done by Anja Hula and Lovro Pandzic.
License
This plugin is licensed under the Apache License, Version 2.0.