Jenkins : OSLC CM Plugin

Connects to different remote bug trackers via the OSLC protocol

Plugin Information

View OSLC CM on the plugin site for more information.

Code

The source code is at https://github.com/jenkinsci/oslc-cm-plugin

Configuration

The plugin uses OAuth as mode of authentification. Jenkins thus has to be registered as an OAuth consumer with the concerned bug-tracker. The corresponding Customer key and secret are to be entered in the Global Configuration page as below:

With the above, we can now request an access token and secret from the bugtracker. A sample script which does so, is available here.  The token and secret are to be entered in the configuration page for the corresponding job.

Bug Creation

This can be done in two ways.

Automatic Creation

On each build failure (depending on the preferences chosen by the user), the plugin does an HTTP POST to the URL specified (as in the screenshot above) on the job configuration page.

The content of the POST request is in json and is configurable.

Clicking on 'Add' opens up textboxes, where the name/value pair of all attributes of the bug report can be added, separated by a '::' sign, as shown below. Quotes are not allowed in the textboxes.

If no attributes are specified, the content of the bug report will be as follows (in json):

{
    "dcterms:title":"Hudson Build Failure",
    "dcterms:description":"<Link to the Build Failure page>",
    "oslc_cm:status":"Open",
    "helios_bt:priority":"3",
    "helios_bt:assigned_to":"Nobody"
}

Manual Creation (Delegated Creation)

This creates a link on the build page which takes us to an embedded iframe containing the content of the url specified (as in the screenshot above) on the job configuration page.

To be done: Support for creating links to newly-created bugs.

See also : a screencast of a demo made with FusionForge trackers : http://vimeo.com/23480321

Attachments:

global_settings.jpg (image/jpeg)
project_settings.jpg (image/jpeg)
access_token.jpg (image/jpeg)
automatic_bug_create.jpg (image/jpeg)
manual_bug_create.jpg (image/jpeg)
Screenshot.png (image/png)
bugreportadd.png (image/png)
bugreportproperty.png (image/png)