Continuous Integration - Drupal way.

Events happening in the community are now at Drupal community events on www.drupal.org.
igor.ro's picture

Motivation:
I'm going to grow quality of products we get in company I working in.
I'm going to make ability to show bugs free product when client what. (functionality that marked "done" realy 100% done)
I'm going to make code clear and developement process managing.
I'm going to make regressive testing cheap.
I'm going to remove trivial round things from my live.

CI can help us.

I think you know what is CI and what goals it allow to reach. (If no, you can read about CI here).
I'm going to create CI infrastructure that will be easy to use on practice of drupal development.

Here is the plan:
1) Ant build scenario.
2) Hudson configuration.
3) Code quality control - Copy/Paste reduce and Code style.
4) Drupal Simple Test and CI.
5) Selenium and Drupal Simple Test module.
6) Effective build configuration.

More detailed about this items.

Tools to use:

ANT:
I have fast run about build tool and find out that ant is base for many of other tools. I mean Maven and Phing. So I choose Ant. In future you can extend and adapt scirpt, i going to provide, for other ANT compatible build tools.

Hudson:
This is very human frendly CI and have a lot of plugins to integrate it with other systems.

Durpal Simpletest:
Drupal provide us api to work with nodes, views, cck and etc. If we would not use special framework to create/update/delete such structures we have to write a lot of additional code to create this objects. So I think there is no other way then to use this cool module.

Selenium: Unit tests and Web tests, provided by Simple test module, is good by we work with Web, many broswers, we use htmls, js, css and flash and a lot of other technologies.

Tool for code quality control is not choosed yet.

I'm open to your minds. Your suggestions are wellcome.
Next post in this disscussion will be next sunday 21.03. 2010.

Thanks.

P.S.: Also is intresting using of Cruise Control and PHP under control plugin.sts and Web tests, provided by Simple test module, is good by we work with Web, many broswers, we use htmls, js, css and flash and a lot of other technologies.

Comments

Pantheon?

johnstorey's picture

You might start by checking out Hudson as part of the Pantheon project. Spinning up an EC2 instance sounds better to me than maintaining your own. You might even go so far as to write a script that spins up an instance everytime you want to do a build, does the build, copies down the results, and shuts off the instance. I have been thinking about that lately -- it all depends on how continuous "continuous" is.

John S.

May be I write post not very

igor.ro's picture

May be I write post not very correct. I'm going to config all this parts in to system that allow to make CI easy. You will have ability to install it to any hudson server. If maitainers of of Pantheon project will decide that my system is enought good to be included in to their project I will be happy :).
P.S.: Yes I'm going to write a script that spins up an instance everytime you want to do a build, does the build, copies down the results, and shuts off the instance.

Keep us posted

ezraw's picture

Thanks for posting this. I'm following this with some interest. We're using Hudson for our deploys from dev > testing > staging and it works great, especially when combined with Drush. Our deploys run in a few minutes so our testers can get to testing new code/configuration every day/hour/minute. It's not true CI, but great nonetheless.

I'd be glad to share the shell scripts we're using with Hudson if it helps.

We're we've had much more trouble is with automated testing using Selenium. We're using a agile methodology and the application UIs change pretty rapidly. It's almost impossible to keep Selenium scripts up to date in this environment. We're thinking of going back to Selenium for regression tests after the app is deployed, but other than that, manual testing has proved to most effective.

I'd be interested to hear what other folks are doing.

Also, you may be aware of this already, but if not, there is a EC2 plugin for Hudson.

Yes I was thinking about

igor.ro's picture

Yes I was thinking about using shell scripts for Hudson, but the other goal of this script is to have tester/designer/manager/ to set up project on thier local machines. And they can have different OS so crossplatfom ANT is good enought for this. Of course there are some steps that are OS dependent. For not it works good for Ubuntu. But I'm going to extend it after finishing this list of articles. btw I hope community will helps me with this. :)
Thanks.
P.S.: I going to post ant script today few hours later.

When your script will be

andersen_ti's picture

When your script will be ready?
Looking forward to start testing it.

I'm sorry for delay. I have

igor.ro's picture

I'm sorry for delay. I have a lot of work need to finish asap. :)
I have promised to post it last weekend.
It needs some little fixes and I gona post it this weekend or early.

Here is the second part

igor.ro's picture

Here is the second part http://groups.drupal.org/node/115269
Thanks

Drupal+Hudson SaS

d1b1's picture

We just noticed that CloudBees.com just opened up Hudson as a Service (HaaS) for java developers. They have built a CI testing service using Hudson and an elastic cloud. After setting up and configuring an in house hudson solution, we were very interested to this what they are up to. We think this a huge idea. Were just getting ready to play with setting up multiple hudson installs on the same server to provide different teams with their own development and CI playgrounds.

It would seem that Cloudbees has already found the solution. The idea of adding elastic cloud resources for the build nodes, seem like a logical solution. We were asked the next question, which was/is would a flavor of this work for the drupal community? I would love to have the month of work we put into the install, setup, training and tweaks to our git work flow back.

In a nut shell, we have hudson running on rackspace linux server, using apache as the front end, git, and bash script that runs php lint, coder module and simpletest (using the xml version http://www.computerminds.co.uk/hudson-and-simpletest). We setup different jobs for each module. Our next step is to add post build actions to force selenium scripts to run using bromine.

Has anyone tried this?
Would there be a need for drupal-haas?

Thanks,

Long Time ASP web developer, who has seen the light and is 100% committed to the drupal way of development.

Bromine Project Fork? Aegir Module

d1b1's picture

There seems to be little followup on this thread. Has anyone move forward on this topic?

I am exploring how we (internal we) can move roll the bromine project into an Aegir modules. We would like to have drupal provide the front end for the selenium test management provided by the bromine project. Bromine is built in CakePHP, so the integration might be more of a complete fork.

Any feedback? Open projects? Interest?

Thanks

Long Time ASP web developer, who has seen the light and is 100% committed to the drupal way of development.

Hey guys,Not sure how

patcon's picture

Hey guys,

Not sure how bromine fits into my own needs, but in regards to the rest of the discussion, we're currently working with opscode chef, which a config management system. We're also using vagrant, which provisions VM for simple local dev using chef. Since all the server configs are in code and interpreted by chef, you can use the same set of instructions to build your dev/stage/prod servers, as well as your local VM's for developement.

This all fits really nicely into the goal of continuous integration, as it allows us to deploy and testing in an automated and consistence fashion, often from single commands.

The good news is that we're hoping to share when we're done. But in the meantime, I highly recommend checking out these tools:
Opscode Chef
Vagrant

Cheers!

And just to clarify, the goal of using chef is to have all your configuration in code, from your server configuration to your application code. So for instance, you could lose a whole server to a bad harddrive, and it's simply a matter of:
knife rackspace server create -S example.com -N example.com -r "role[example-com]
and the whole thing is back up and running on a new rackspace node, complete with new DNS domain A-records (through the DynECT hosted DNS API), and all your sysadmins ssh keys (which are stored in vers control too), to your drupal sites (which are pulled in a built from make files using drush make) and site data (pulled in from automated backups using drush sql-sync).

Lots of this is possible to generalize, so we're excited to share when it's ready!

Testing and Quality Assurance

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: