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:
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:
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:
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
Description | Link | License | Problem | ||||||
---|---|---|---|---|---|---|---|---|---|
|
| ||||||||
Apache HTTP Client library, used to access Confluence | https://hc.apache.org/httpcomponents-client-ga/ | Apache License 2.0 http://www.apache.org/licenses/ |
| ||||||
Apache Commons Lang, used for variable replacement | https://commons.apache.org/proper/commons-lang/ | Apache License 2.0 http://www.apache.org/licenses/ |
| ||||||
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-client | Apache License 2.0 http://www.apache.org/licenses/LICENSE-2.0.html |
| ||||||
Google GSON, used for parsing the JSON responses | https://sites.google.com/site/gson/Home | Apache License 2.0 http://www.apache.org/licenses/LICENSE-2.0.html |
| ||||||
Jenkins Credentials Plugin Used to store usernames & passwords as jenkins configurations. | https://wiki.jenkins-ci.org/display/JENKINS/Credentials+Plugin | MIT License https://github.com/jenkinsci/credentials-plugin/blob/master/LICENSE.txt |
| ||||||
Jenkins Github Plugin Used for accessing Github. | https://wiki.jenkins-ci.org/display/JENKINS/GitHub+Plugin | MIT License https://github.com/jenkinsci/github-plugin/blob/master/LICENSE |
|
Used API's
API | provided functionality |
---|---|
JIRA REST API | Provides 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 API | Used 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
Task | Status | ||||||
---|---|---|---|---|---|---|---|
Select open source license | AGPLv3 | ||||||
Validate license compatibility |
| ||||||
Add license file to source code |
| ||||||
Create maven build |
| ||||||
Validate code quality (any requirements from Jenkins marketplace?) | |||||||
Decide on maintenance strategy | |||||||
Select plugin ID (short name in build.gradle) should neither include | |||||||
Upload source code to GitHub | https://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 |