Author Archives: Martin Mrazik

About Martin Mrazik

QA Professional with Open-Source background.

Continuous Integration with Jenkins and Launchpad

This post will describe how we are using Jenkins and Launchpad together to achieve Continuous integration.

Right now we are running our tests right after the code is (manually) reviewed and just before pushing them to trunk. We refer to this part of the process as autolanding and there are tools (tarmac) which can automate the process. However the manual process of code review can take quite some and our jenkins jobs are not triggered until the review is ready.

We would like to run tests much sooner, though. Ideally the workflow would be as follow:

  1. A new Merge Proposal in launchpad is created
  2. Jenkins job is triggered and starts the defined testing on defined configurations (e.g. tests on precise-i386, precise-amd64, quantal-i386, quantal-amd64, etc)
  3. Once all the tests finished the merge proposal is updated with the test result and a link to the jenkins job

In our case we are using libvirt and VMs to achieve a clean and isolated test environment. Therefore we are doing some post-test clean-up actions (reverting the VM to a predefined snapshot).

Our jenkins setup looks roughly like this.

In this case there are jenkins jobs:

  1. unity-ci – job which gets triggered as soon as a new merge proposal exists for lp:unity and does the testing
  2. generic_update-mp – parametrized job which will take test result, merge proposal and few other parameters and updates the merge proposal in launchpad with the result.

Flowchart for the whole process:

The setup for autolanding is very similar:

The only difference is that

  1. unity-autolanding job is triggered when a merge proposal is approved
  2. generic-land job will also merge the branch from merge proposal to trunk and does the actual push to trunk

The flowchart is slightly more complicated as there are more possible failure points (e.g. the testing might pass but the autolanding will fail because we require non-empty commit message and the commit message was not specified):

Right now we have a prototype in Python using a ScriptTrigger plugin for jenkins which is implementing all of this. I will describe in the next post how use it in practice together with some examples.

Leave a comment

Posted by on June 14, 2012 in Uncategorized


Quality (not only) in Budapest

Last week was my first one at Canonical and I spent it in Budapest where Ubuntu Engineering and Product Strategy teams had their rally. This is the first company where I was asked to travel on my first day and it did feel strange at the beginning 🙂 After being a Canonical employee for 1+ week I think it is the best way how to start in a new job.

When talking about quality these are probably the key observations I have made from my new perspective of a Product Strategy Quality Lead:

  • Quality really is a focus. Every single engineer I’ve met in Budapest was thinking in terms like unit tests or code coverage and how to make Ubuntu (even) better.
  • More and more people inside Canonical are now focused solely on quality. We have several (great) Quality Engineers, a new QA Community Coordinator. I started last week and Canonical is still hiring some more.
  • A lot is actually already done and you can see and touch the results.  Just give 12.04 with the latest Unity 5.0 a try.
  • Even more is on the way and we will try to cover most of that on this blog as times go.

Being in Budapest was certainly overwhelming but it was worth it. I’m not a person who gets easily excited but now I really am (both from the people and the new products such as Ubuntu TV). I and other quality engineers plan to write more about tools, approaches or just things we consider useful, so please stay tuned.

Do you have any good experience with specific methodology or tool? How did it help with your software projects? Is there anything specific you would like to see on this blog?

Leave a comment

Posted by on January 19, 2012 in Quality