How to send notication from Jenkins to HipChat

  • Taille du texte: Agrandir Réduire
  • Notifications
  • Imprimer
How to send notication from Jenkins to HipChat

Hi everyone, today we’re continuing our how-to series (last was How to make Confluence post to HipChat) for the productive (yes yes, a chat tool can be productive) and powerful software HipChat, this post will show you its integration with the continuous integration server Jenkins.

 

Continuous Integration and Jenkins, what is it ?

Today, CI should be a mandatory practice for each software development company in order to automate and industrialize the lifecycle of applications. The main purpose is to monitor the project’s “health” after every change (own code base, dependencies libraries, servers API, etc...). For more information about CI principles, I invite you to read its wikipedia page.

Jenkins is certainly the most popular of CI server/tool and of course, and you will have guessed it’s the CI server we use at TechSolCom. The main competition is Hudson (origin project for Jenkins and forked after a dispute with Oracle), Bamboo (from Atlassian!), TeamCity, CruiseControl or Travis CI. For a comparison of them, you can check this wikipedia page.

HipChat plugin for Jenkins

At TechSolCom, we use Jenkins every day and try to draw the maximum force with its multitude of plugins (over 600!) and thus one of them is the HipChat plugin. This plugin allows to setup build notifications to be sent to HipChat rooms. It’s another kind of build notifier that  can complement existing mechanisms as email, a monitor view projected on open space TV and many others.

The advantage of being notified in a HipChat room comes from the idea (and strength) that a room can be associated to a specific software/application project. Notifications can therefore arrive quickly (by desktop message or by mobile notification message), partitioned (by project and its developers) and accessible (because they are persisted and easily searchable).

 

Plugin configuration

After having installed the plugin, the three following steps are:

    1.  Configure the plugin settings in the Jenkins administration:Capture d'écran 2014-03-29 15.49.48.png

  • API Token: the API authentication token to be used to send notifications to HipChat. You can copy this from the settings page within HipChat.
  • Room: a default room name (but you can customize the room name per-project)
  • Jenkins URL: this value is used to generate links back to Jenkins from HipChat

 

    2. Now, in the configuration page of build, a new part ‘HipChat Notifications’ is present. To activate notification for the build, enter the targeted room and check the below checkbox, Capture d'écran 2014-03-29 16.18.33.png

 

    3. and finally, add a post-build action.

Capture d'écran 2014-03-29 16.23.50.png

 

Congratulation! You are now ready to send build notification from Jenkins to HipChat, as the example below:

Capture d'écran 2014-03-14 16.19.39.png

dans HipChat Lectures : 23762 6 commentaires

Commentaires

  • Invité
    sruti vendredi, 09 mai 2014

    This was very helpful! Thank you!

  • Invité
    Isaac mardi, 26 août 2014

    Does this work for a custom HipChat server or just HipChat.com?

  • Administrateur Joomla
    Administrateur Joomla jeudi, 23 octobre 2014

    Hi Isaac,
    sorry for this late answer :(
    I confirm you that you can use a custom HipChat server.
    Regards.

  • Invité
    Nolan mardi, 23 septembre 2014

    Great post, worked perfectly. Thanks!

  • Invité
    Daniel mercredi, 19 novembre 2014

    It doesn't seem to work for me behind a firewall... No logging and no information in the build console about any failures just silence :(

  • Invité
    Guru mercredi, 07 janvier 2015

    same here not working for me .. hitchat server is installed with in the network

Commenter cet article

Invité
Invité samedi, 19 août 2017