7
A continuous deployment process for symfony plugins
3 Comments · Posted by Christian in The right tool
For a while I’ve been toying with the idea to set up a fully automated continuous deployment process for my symfony plugins. You can think of continuous deployment as a continuous integration process with automated deployment.
I just didn’t come round to do it as I couldn’t find the time so far. But then I read this article by Toni Schneider about CD at wordpress.com and it got me hooked again.
So I thought lets write down what it takes for a start.
The plugins I would like to build this process for are all Open Source so it only partly applies to proprietory ones but I’m sure you can handle that.
I do all my development using Git and all sources are kept and maintained at GitHub. The develoment itself is done on various computers depending on where I am at the moment.
However the plugin releases live as tags in the official symfony Subversion repository and as packages on the official symfony PEAR server.
Here’s my continuous integration setup so far.
- I commit my changes to my local repository
- I push my changes to the GitHub repository
- the continuous integration server (Hudson) regularily pulls GitHub to see if there is any change
- noticing the change the CI server will run automated tests included in the plugin
- it will also run a few reports about software metrics and sniffs
- and it will compile the API documentation and code coverage reports
- when all went well it shows a green light for pass
- if it failed at some point it will signal a red light and send me a mail
Extending this with an automated deployment I would expect a new release pushed to the symfony Subversion server as well as the PEAR server.
But unlike Toni at wordpress I don’t fancy rapid releases as the users of plugins are developers who work with it and they don’t want to contantly upgrade of course. So I don’t want to automatically trigger a release for ever small change I make. Instead I still want to be in charge.
So I am thinking about setting a tag on my GitHub repository for each release (I already do that thanks to Benjamin) and use that as a trigger.
And when I already use that trigger to distinguish a release from any other change then I can use it to defer the execution of expensive tasks like the generation of coverage reports and API documentation only for releases, right?
- I commit my changes to my local repository
- I push my changes to the GitHub repository
- the continuous integration server (Hudson) regularily pulls GitHub to see if there is any change
- noticing the change the CI server will run automated tests included in the plugin
- it will also run a few reports about software metrics and sniffs
- when all went well it shows a green light for pass
- if it failed at some point it will signal a red light and send me a mail
- if no new tag is present we stop here other wise we continue
- and compile the API documentation and code coverage reports
- then commit the tagged version from GitHub to the symfony Subversion server
- update the package.xml from the previous commit messages
- then create a PEAR package and commit that to the symfony PEAR server
- tweet about the new release
Unfortunately the plugin API of the symfiony website does not provide an interface for uploading a new release but I am sure the existing web interface can be scripted.
Ok, so that’s my todo list for setting up a continuous deployment process unless you know something to add?
Continuous Deployment · Continuous Integration · Hudson · Open Source · Plugin · plugins · symfony · Tests · Unit Tests


Pingback: Tweets that mention • A continuous deployment process for symfony plugins | test.ical.ly -- Topsy.com