How to Mash-up Activity Streams from Jira, Sonar and Jenkins

We are going to build a space that follows the development of a piece of software. We are going to take as an example the development of eXo Platform.

We want to integrate events from the tools that are used by the development team:

  • Our task manager: Jira
  • Our code quality tool: Sonar
  • Our building system: Jenkins

Create the space and configure it

We need to create a space for the eXo Platform Development Team members to share:

  • From the home page go to “My Spaces”.
  • Create a new space and call it eXo Platform Development.

01-xadd-new-space

  • Switch to the “Invite users from group” tab and add the development team as the space’s members.

02-xinvite-members

  • The Dashboard application is not present by default, so let’s add it into your new space:

03-xcreate-dashboard

  • 1/ Go to “Space Settings”.
  • 2/ Click on the “Applications” tab.
  • 3/ Click “Add Application”.
  • 4/ Select the “Tools” category.
  • 5/ Select “Dashboard” and click “Add”.

Now we will add the gadgets to track our development:

  • Go to the “Dashboard” and click on “Add Gadgets”.

04-xadd-gadgets

05-xenter-gadgets-url

  • In the list, select the eXo Platform project and save.

06-xsave-gadget-preferences

Then repeat these steps for the Jira gadget:
https://raw.github.com/exo-addons/resource-center/master/jira-sonar-hudson-gadget/activitystream-gadget.xml
and the Jenkins gadget:
https://raw.github.com/exo-addons/resource-center/master/jira-sonar-hudson-gadget/jenkins-gadget.xml

For the Jenkins gadget, you need to edit the preferences of the gadget to change the project and enter the url of the Jenkins page you want to follow, for example:
https://ci.exoplatform.org/view/%C2%B0%20Projects%20%C2%B0/view/-%20platform%20-/job/platform-4.0.x-ci/.

The result looks like this:

07-xgadget-results

Integrate data into the activity stream of a space

Thanks to the extensibility of eXo Platform, we can republish feeds into different stream. The Feedmash service is an extensible service that can take an RSS feed and push the entries into the activity stream of a user or a space. By default, eXo Platform has two of them: Jira and Jenkins.

To configure Feedmash, you need to add JiraFeedConsumer and HudsonFeedConsumer as scheduled jobs (FeedmashJobPlugin). Use the configuration.xml file as a sample and put it into gatein/conf/portal/portal/
https://raw.github.com/exo-addons/resource-center/master/jira-sonar-hudson-gadget/configuration.xml

If the file already exists there, you can easily add the configuration into it.

Note the mash.info configuration of both the Jira and Jenkins jobs:

  • “username” and “password” are your Jira/Jenkins username and password.
  • “project” is the project ID given in Jira and Jenkins.
  • “targetActivityStream” must be “space:{$spaceID}”. You can get $spaceID (shown in red) from the URL. For example: http://localhost:8080/portal/g/:spaces:exo_platform_development/exo_platform_development
  • “baseURL” is the URL of your Jira and Jenkins server.

Our activity stream should now look like this:

08-xactivity-stream-result

Summary

We’ve shown you how to build a customized space that meets the needs of a typical developer team. We added gadgets to a shared dashboard giving the development status and the project’s events, and republished the information into an activity stream as well. You can now start to create your own spaces and customize them to meet your specific needs.

Make the most out of eXo Platform 4

Register to the next webinar and get a complete overview of what you can do with eXo Platform 4. Reserve your seat now!

Be part of the discussion, share your comments

comments

Keep in touch with the author

Tags: , , , ,