Tux Droid Plugin For TeamCity Continuous BuildServer

From Walter Cedric Wiki
Jump to: navigation, search


Contents

Introduction

Tux Droid

Tux-droid-linux-companion.jpg

is a Linux wireless Tux mascot (210mm x 180mm x 140mm - with lowered wings) with a programmable interface, allowing it to announce events by its gestures and by ALSA driven sound. The events are detected by specific gadgets, which are handled by the Tux Gadget Manager. The Tux Droid supports Linux kernel 2.4 or later and needs a 800 MHz CPU and 128 MB RAM. It communicates by infrared to the USB port (1.1 or 2.0) and for media detection it needs an internet connection. The mascot is driven by Atmel AVR RISC microcontrollers. From http://en.wikipedia.org/wiki/Tux_Droid

http://www.kysoh.com/
http://www.tuxisalive.com/ homepage of Tux Droid

TeamCity

is a Java-based build management and continuous integration server from JetBrains, creators of IntelliJ IDEA and ReSharper. It was first released on October 2, 2006. See TeamCity

Tux Droid Plugin

With this plugin you can notify your Tux Droid with your TeamCity build results.

After login you can find the new notificator Tux Droid in your notification settings. You need your Tux Droid server IP and port  to connect your Tux to TeamCity. After you have saved the parameters you can configure your individual notification settings for just all projects/specific projects/build failures/...

Each registered User can use different Tux Droid or message !

Installation

Attention!

The plugin including tuxApi have been compiled with Java 1.6, so TeamCity has to run with java 1.6, if it is not the case, just replace the content of TeamCity/jre with the content of the JDK 1.6/jre

Download

Teamcity 5

Download from http://tuxdroid.waltercedric.com/

  • tuxdroid.teamcity5.plugin-0.0.2-SNAPSHOT.jar

And drop this file in your Teamcity WEB-INF/lib directory

for example in TeamCity/webapps/ROOT/WEB-INF/lib if you use the standalone version

Restart Teamcity

By issuing a 

TeamCity/bin/shutdown.sh

TeamCity/bin/startup.sh


Prepare Tux Droid 

Check that your TUX DROID respond to localhost & IP request, by issuing the command

http://127.0.0.1:270/0/mouth/open?

And check also that the server is also bind to the real ip (do not only respond to localhost) in case your teamcity do not run the tux droid server as well.

TUX server only listen to 127.0.0.1 and no other address. Obviously for the same reason it's impossible to command TuxDroid from a remote computer. If your Teamcity run on another server, you will have to modify the integrated Tux Droid python server

More details at
http://wiki.tuxisalive.com/index.php/How_to_http_requests

Open The Tux Droid server to listen to all incoming request

Open the server on the network by opening the file

C:\Program Files (x86)\Kysoh\Tux Droid\softwares\smart-server\TDSConfiguration.py

Comment Line 38  , and add a empty one

  1. Host address for the server sockets
    if os.name == 'nt':
      # TDS_CONF_HOST_ADDRESS = '127.0.0.1'
      TDS_CONF_HOST_ADDRESS =
    else:
      TDS_CONF_HOST_ADDRESS =

Restart the Tux Droid server





Settings

Basics

  • TuxDroid IP: This is the IP of the Tux Droid server, the server where you did attach the radio dongle Fush
  • TuxDroid Port: this should be the default port, aka 270 but if you have change it, then put the right port number in there

Customizing

You can leave all these field empty, by doing so you'll get the default message...

  • Failed:
  • Failing:
  • Hanging:
  • Labelling Failed:
  • Responsible Changed:
  • Started:
  • Successful:

Or you can either put you own message like

Failed:   Who has break the build %u

Placeholder support

words starting with % are reserved placeholder

  • %b means Build full name
  • %u means notified Username
  • %n means notified Name
  • %a means Agent name
  • %# means Build number

it will get replace at runtime, you can freely put it anywhere in the sentence!

Tuxdroid.teamcity.custom.png

Or use an attitune that is available on the server

full path name to that resource starting with a #

Plugin is unable to know if this file exist on remote server!

  1. /home/cedric/MyTux/MyTuxAttitunes.att

or

  1. file:///C:/Documents and Settings/cp00wac/MyTux\MyTuxAttitunes/wake_up2_eng.att

Screenshots

version 0.0.1

Tuxdroid.teamcity.plugin.png

Licence

GPL v3.0



Source code

The source code is available at http://code.google.com/p/teamcitytuxdroidbuildplugin/

You can request to join the project by emailing me 

Eclipse project use M2Eclipse and is fully build with MAVEN 2.0/3.0

Maven Structure

tuxdroid-teamcity-plugin
+---tuxdroid-teamcity-common
+---tuxdroid-teamcity4
\---tuxdroid-teamcity5


How to make a new version

  • You need Eclipse IDE, with M2Eclipse correctly configured
  • Import project into eclipse workspace, it will create a project name tuxdroid-teamcity-plugin
  • On file pom.xml, right click, run As, Maven package
  • It compile and run a set of testcase, tux may speak during that stage ;-)

Deliverable are in tuxdroid-teamcity-plugin/target/


3rd party API

latest tuxdroid-java-api-0.3.0.jar can be found in C:\Program Files (x86)\Kysoh\Tux Droid\softwares\smart-server\util\applicationserver\plugin\interpreters\javacommonjar\


Log files

Add the following

<category name="com.waltercedric.tuxdroid.buildserver.teamcity.TuxDroidNotificator">
 <priority value="DEBUG"/>
 <appender-ref ref="ROLL"/>
 </category>

into TeamCity/conf/teamcity-server-log4j.xml

Logs are located at TeamCity/logs/