Jira Version Generator

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

License

License

GroupId

GroupId

com.infobip
ArtifactId

ArtifactId

jira-version-generator
Last Version

Last Version

2.0.1
Release Date

Release Date

Type

Type

atlassian-plugin
Description

Description

Jira Version Generator
Bitbucket (post receive hook) plugin that generates Jira version and links Jira issues to the version.
Project URL

Project URL

https://github.com/infobip/jira-version-generator
Project Organization

Project Organization

Infobip Ltd.
Source Code Management

Source Code Management

https://github.com/infobip/jira-version-generator.git

Download jira-version-generator

Dependencies

compile (5)

Group / Artifact Type Version
com.fasterxml.jackson.core : jackson-databind jar 2.8.1
com.fasterxml.jackson.datatype : jackson-datatype-jdk8 jar 2.8.1
com.fasterxml.jackson.module : jackson-module-parameter-names jar 2.8.1
com.fasterxml.jackson.datatype : jackson-datatype-jsr310 jar 2.8.1
org.projectlombok : lombok jar 1.18.10

provided (6)

Group / Artifact Type Version
com.atlassian.sal » sal-api jar
com.atlassian.bitbucket.server » bitbucket-api jar
com.atlassian.bitbucket.server » bitbucket-spi jar
com.atlassian.applinks » applinks-api jar
com.atlassian.bitbucket.server » bitbucket-page-objects jar
org.slf4j : slf4j-api jar 1.7.21

test (2)

Group / Artifact Type Version
org.assertj : assertj-core jar 3.5.2
org.mockito : mockito-core jar 1.10.19

Project Modules

There are no modules declared in this project.

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.

com.infobip

Infobip

Infobip Ltd.

Versions

Version
2.0.1
2.0.0
1.1.0
1.0.0