Näytetään tekstit, joissa on tunniste Hudson. Näytä kaikki tekstit
Näytetään tekstit, joissa on tunniste Hudson. Näytä kaikki tekstit

keskiviikko 7. huhtikuuta 2010

(Almost) Continuous deployment with Gerrit and Hudson

Here's a somewhat simplified workflow for continuous deployment when working with Gerrit and Hudson.


As you can see, features are deployed into Beta server instead of production server. This is mandatory when working with corporate clients, they don't want to have real continuous deployment.

keskiviikko 25. marraskuuta 2009

Hudson and Python

Using Hudson with Python is pretty easy, at least when using Buildout. I currently use following buildout script with Hudson (only relevant parts are shown):

parts = python hudson_test
develop = .
eggs =
   project_name

[python]
recipe = zc.recipe.egg
interpreter = python
eggs = ${buildout:eggs}

[hudson_test]
recipe = pbp.recipe.noserunner
defaults = --with-doctest --with-xunit
eggs = ${buildout:eggs}

[hudson_test] -part uses nosetest to find all tests from project, including doctests (--with-doctest). When using --with-xunit -parameter, nosetest will output test results to nosetests.xml, which is "standard" xUnit result file. Hudson can then track and display test statistics.

Running tests in Hudson is done by calling bin/hudson_test as shell build step. Because nosetest outputs test results as a XML-file, it's pretty trivial to show results in Hudson.

keskiviikko 28. lokakuuta 2009

Deployment system

I strongly believe that tool supported deployment system is necessary for successful software development, especially when using agile or lean methodologies. In both methodologies there's strong emphasis to finish one feature completely before moving to another. Good deployment system makes it easier to be sure that feature is actually finished.

The purpose of deployment system is to make sure that every feature is tested, reviewed and accepted by customer. To accomplish this, deployment system should have support for automated testing, code reviewing and issue management. I don't know any single software which would accomplish all of these, so current solution I use consists of multiple different programs.
In ideal development flow when feature is "code ready", it will be pushed to Git repository and Hudson will pull the change and does automated testing. Same time code is reviewed with Gerrit. After these two steps are completed successfully, feature is deployed automatically by Hudson to test server and marked ready in Jira. Then customer checks and accepts the feature effectively ending the development of that particular feature.