Want to show your appreciation? Please to my charity.

Saturday, January 21, 2012

Jenkins Build Status Monitoring

Introduction

Jenkins is an award-winning job monitor application focuses on the following two jobs:
  1. Jenkins provides an easy-to-use continuous integration system, making it easier for developers to integrate changes to the project, and making it easier for users to obtain a fresh build. The automated, continuous build increases the productivity.
  2. Monitoring executions of externally-run jobs, such as cron jobs and procmail jobs.
The detailed information of Jenkins is can be found on Jenkins website: http://jenkins-ci.org/.
In this documentation, we introduce two client side monitoring tools:
  • CCTray – Window based application that shows visual indication and notification of the build status of your projects.
  • Hudson Mylyn Connector – Integrates with Eclipse IDE to support for running and monitoring builds as well as inspecting the results.

CCTray

CCTray is part of CruiseControl build system. It’s a Windows system tray application that can be used to to provide the status and notification of build jobs in Jenkins.

Installation

CCTray can be downloaded from the CruiseControl.Net’s project download page. Latest release is CruiseControl.NET-CCTray-1.6.7981.1-Setup.exe when this is written.
It is recommended to start CCTray on Windows start up. This can be done by adding CCTray application link to the Startup folder of Windows start menu.
In Window 7, you may also want to make the CCTray icon always show. 
cctray-customize cctray-notification

Connect to Jenkins Server

  1. Click on tray icon to open the main CCTray window.
  2. Go to menu item “File->Settings…”
  3. Select “Build Projects” tab. Check on the projects that you want to monitor. If all your projects are listed. Click OK to complete the configuration. Otherwise, use “Add…” button and continue to next step.
    cctray-projects
  4. In the “Project” dialog, select the build server where your project is on. Then select all available projects and click OK. Back to step 3 to complete your final selection of projects to monitor. If the your Jenkins server is not listed, click on “Add Server” button and continue to next step.
    cctray-available-projects
  5. In the “Build Server” dialog, select “Supply a custom HTTP URL” radio button. Enter URL http://jenkins.yourdomain.com/cc.xml in the text box. Then click on OK. Back to previous step to add all available projects.
    cctray-build-server

Status Update

Once you have added your project, you should be able monitor your build status and receive notifications. You can also double click on the project to jump to the job page of Jenkins’ build server website. Below are some example screenshots show the status and notification.
cctray-failed
cctray-building
cctray-success

Known Issues

Due to the limit integration capability between CCTray and Jenkins server, job control features of CCTray won’t work. For example, you cannot start/stop Jenkins job from CCTray.

Mylyn Hudson Connector

Mylyn Hudson Connector is a connector for Mylyn Builds. This document helps you to install the connector and connect to your Jenkins build server.

Installation

Use Eclipse menu item “Help->Install New Softwre…” to install the plugin from the location indicated below.
Note For detailed instruction of how to install Eclipse plugins, please refer to General Installation Instructions section of Install Eclipse and Commonly Used Plugin page.
Work with URL: http://download.eclipse.org/mylyn/releases/indigo
Features to be selected to install:
  • Mylyn Integrations
    • Mylyn Builds Connector: Hudson/Jenkins (Incubation)

Add Build Server

  1. Make sure you can connect to your Jenkins server through browser.
  2. Open “Builds” window
    Show View For detailed instructions on how to show feature window, please refer to Access Feature Window section of Eclipse and Common Plugin Installation.
  3. Click on “New Build Server Location” toolbar button.
    jenkins-add-server
  4. In “New Repository” dialog, select “Hudson (supports Jenkins)” and click “Next >” button.
    jenkins-new-repo
  5. In “New Build Server” dialog,
    jenkins-new-server
    1. Enter server and label provided below.
    2. Unselect “Anonymous” checkbox, and enter your Jenkins user ID and password.
    3. Click on “Validate” button. If you entered the correct information, the Build Plans list box should be populated with available jobs on Jenkins server.
    4. Select the project(s) that you want to monitor and click “Finish” button.
  6. You build jobs should now appear in the builds window. You can always add more jobs to monitor using the property page of the build server you have just added.
    jenkins-properties

Configuration

You can use Eclipse preference to automatically refresh the build status periodically.
jenkins-preferences

References

Reference links are provided for further reading of Mylyn and Jenkins integration.

Others

3 comments:

DesertShadow said...

If you need to put a username and password, build the DLL using Visual Studio of this (it's easy because it's C#): https://github.com/csnate/cctray-jenkins-transport

Mikhail Rogov said...
This comment has been removed by the author.
Mikhail Rogov said...

One more good tool to look after Jenkins builds :-) , https://catlight.io/a/jenkins-build-status-notifications .
Build status monitoring and notifications with "build investigations" features, witch helps to analyze who broke the build, http://blog.catlight.io/post/144836050563/build-investigations .

Post a Comment