Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

What is it?

The JIRA Publisher Plugin for the Jenkins build server Release Plugin is a Plugin for publishing information on JIRA after a successful Jenkins build.

Current Features

  • Update JIRA Versions of a project and mark them as released (and optionally create the version if it does not exists yet)
  • Publish an airbitary amount of new, completely customizable Tickets
  • All published data is parameterizable: Variables like "${variableName}" will be replaced at any occurrence with their actual value at runtime
  • Allows automated creation of a release notes page of the just released version

The user interface

The plugin is available as a post build action:

Image Removed

In the given example, running the build results in ${oldVersion} (where "oldVersion" is a build parameter) being marked as released on JIRA and also creates a new version named "${newVersion}".

Additional, the optional checkbox for creating a release notes page is checked, which results in the following page being created on Confluence:

Image Removed

In this case "oldVersion" was 1.1, so the page was created listing all Tickets of version 1.1.

The plugin also allows the automated creation of new Tickets:
Image Removed

By clicking on Add > JIRA Ticket, a template for a Ticket can be added. Every field can be parameterized with the same ${varName} syntax.
When executing the build, each of this Tickets is published on JIRA and automatically assigned to the new version, which in this example was ${newVersion}.
The plugin also checks whether any of the tickets already exists (by checking for the version and title) in order to prevent duplicate tickets.

 

 

Code

The source code repository can be viewed at gitlab.

Dependencies

DescriptionLinkLicenseProblem
Generic HTTP Client provided by jersey, used to access Confluencehttps://jersey.java.net/

Jersey is dual licensed under 2 OSI approved licenses :

Status
colourRed
titleYes
Apache HTTP Client library, used to access Confluencehttps://hc.apache.org/httpcomponents-client-ga/Apache License 2.0
http://www.apache.org/licenses/
Status
colourGreen
titleNo
Apache Commons Lang, used for variable replacementhttps://commons.apache.org/proper/commons-lang/Apache License 2.0
http://www.apache.org/licenses/
Status
colourGreen
titleNo
JIRA Rest Client Library, providing an object oriented wrapper
around the REST calls to JIRA.
https://marketplace.atlassian.com/plugins/com.atlassian.jira.jira-rest-java-clientApache License 2.0
http://www.apache.org/licenses/LICENSE-2.0.html
Status
colourGreen
titleNo
Google GSON, used for parsing the JSON responseshttps://sites.google.com/site/gson/HomeApache License 2.0
http://www.apache.org/licenses/LICENSE-2.0.html
Status
colourGreen
titleNo
Jenkins Credentials Plugin
Used to store usernames & passwords as jenkins configurations.
https://wiki.jenkins-ci.org/display/JENKINS/Credentials+PluginMIT License
https://github.com/jenkinsci/credentials-plugin/blob/master/LICENSE.txt
Status
colourGreen
titleNo

Jenkins Github Plugin

Used for accessing Github.

https://wiki.jenkins-ci.org/display/JENKINS/GitHub+PluginMIT License
https://github.com/jenkinsci/github-plugin/blob/master/LICENSE
Status
colourGreen
titleNo

Used API's

APIprovided functionality
JIRA REST APIProvides access to all tickets and project versions on JIRA and allows modifying them.
Does not support directly generating the release notes, instead the HTML is manually built in code from the information which is gained through the API.
Confluence REST APIUsed to search a page by title and to insert the new release notes page.

 

Open Questions

  •  What should happen if the release notes page already exists? It might have been edited manually so overwriting it might not be a good option.
  •  Integration of Github connectivity to publish release notes also on github. Henning Schulz

Todo

  •  Java Doc
  •  Unit Tests?

 

 plugin for Jenkins to automate several Tasks of the build process.

The source code and further information can be viewed at the GitHub Repository.

Open Source Process

https://wiki.jenkins-ci.org/display/JENKINS/Hosting+Plugins

 

TaskStatus
Select open source licenseAGPLv3
Validate license compatibility
Status
colourGreen
titleDONE
Add license file to source code
Status
colourGreen
titleDONE
Create maven build
Status
colourGreen
titleDONE
Validate code quality (any requirements from Jenkins marketplace?) 
Decide on maintenance strategy 
Select plugin ID (short name in build.gradle) should neither include plugin nor jenkins 
Upload source code to GitHubhttps://github.com/inspectit-labs/release-plugin
Create jenkins-ci.org account 
Send the required mail to the developers' mailing list to tell necessary information to be forked into the GitHub Jenkins organisation 
Create Wiki page and add it to repository 
Add maintainer information 
Release plugin to jenkins-ci.org