Fun with Javascript for Hudson

Right now, I do not have a lot of experience with Javascript but after having seen some funny stuff done to our internal Bugzilla with a userscript (templates for bugreports patched into the comment field), I decided to give it a try. Sometimes jobs in our internal internal build servers (Hudson) will break over night because of full hard drives e.g. So we created a special view with all failed builds and a Hudson extension to build all jobs in a view.

Now I thought this could be easily accomplished with Javascript as well, so I read a little bit about YUI2, which is included in Hudson already and came out with my first Javascript extension, which I host on Bitbucket.
The source code:

  • I just save the script in the userContent folder of Hudson and source it in the description of the view like this:
    <script src="/hudson/userContent/hudson_extensions/he-all.js" type="text/javascript"></script>.
  • First, I attach the initialization with the help of the YAHOO.util.Event.onDOMReady to the point in time when the whole page is rendered, on my first tries I only collected the links already rendered up to the point where the script was included.
  • If any job build links are found (isBuildHref), I render a Build All link.
  • When hitting the link, I just iterate over the links (buildAll) and send an asyncRequest discarding the result by not specifying a callback function at all to trigger the actual builds.
Now I already can think of other useful stuff to do with this :-).


Command-Tab - Blog Archive - How to Test RAM Under Mac OS X

After updating my Macbook from 2GBG to 4GB I ran Command-Tab - Blog Archive - How to Test RAM Under Mac OS X five times, as the the two blocks I have got first showed artifacts on the screen, now everything is running happily :-),


Upgrading a 1&1 Dynamic Cloud Server from Ubuntu 8.04 LTS to 10.04 LTS

My first try following the instructions for Lucid was not successful, after shutdown -r now the Dynamic Cloud Server did not start up again. It is a pity that there is no serial console nor a Rescue or Repair-mode, so I gave it another try...

After loads of retries (new initialisation, waiting and another execution of do-release-upgrade --devel-release) I found the solution in the end:

  • While do-release-upgrade --devel-release updated dhclient I took the old configuration with static-route, see dhclient: classless static route, bug? as well.
  • As I had no second chance to boot without security, I removed apparmor (apt-get remove apparmor), maybe I will install this again after some research.
  • Most important: New Linux-Kernels include a new IDE-driver, which adresses former hda devices as sda, so I changed three things after the package update but before reboot:
    • In /boot/grub/menu.lst I replaced # kopt=root=/dev/hda1 ro console=tty0 console=ttyS0,57600 with # kopt=root=/dev/sda1 ro console=tty0 console=ttyS0,57600.
    • After that I called update-grub to update the configuration of grub.
    • In /etc/fstab I replaced all occurrences of hda with sda.

Now the server is up and running again :-)

What's this all about?

After having a german blog for some time I now decided to allow myself a second blog, where I will post about technical matters.