All Projects → infobip → jira-version-generator

infobip / jira-version-generator

Licence: Apache-2.0 license
No description, website, or topics provided.

Programming Languages

java
68154 projects - #9 most used programming language
Closure Templates
11 projects

Jira Version Generator

Coverage Status Maven Central

Bitbucket Server (post receive hook) plugin that generates Jira version and links issues to the version.

Contents

  1. News
  2. Requirements
  3. Installation
  4. Usage
  5. Features
  6. Contributing
  7. Useful Atlassian Plugin SDK commands
  8. Credits
  9. License

News

2.0.1

Upgrade to Bitbucket Server 6.5.1.

For previous changes see the changelog.

Requirements:

  1. Bitbucket Server has an application link with a Jira instance.
  2. 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:

  1. Version is extracted from the commit message
  2. Jira issue keys are extracted from older commits in that branch until commit that matches the pattern is encountered
  3. Jira version is created
  4. 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:

project-settings

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

commits-1.png

when a new commit arrives with a message [maven-release-plugin] prepare release my-test-project-1.0.0

commits-2.png

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.

version.png

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.

release-commit-version-pattern.png

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

version-prefix.png

release version will look like

prefixed-version.png

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 debugging
  • atlas-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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].