Page 1 of 1

CI, CD etc.

Posted: Wed Nov 28, 2012 3:39 pm
by VladSun
For the last 1 year I've been actively trying to convince my boss (99% done :) ) and my team (10%) of the benefits provided by using Continuous Integration and Continuous Deployment. I am still the only one to use Unit tests (PHPUnit) and Acceptance tests (Selenium tests). While my boss and I agree that we need that kind of approach I am still not sure exactly what environment I should use. Currently I have done:
- Jenkins CI server;
- "PHP Template" job config (i.e. plint, pmd, pcpd, phpunit, etc.)
- Selenium (using PHPunit adapter) tests - Selenium Grid server using Selenium server node with headless browsers via xvfb and Selenium server nodes on Windows stations;
- git VCS;

What I miss:
- DB schema deployment tool to clone the current DB schema to the CI server;
- DB migration tool (I've looked at Doctrine migration tool, looks nice but ...) able to integrate itself to git;
- Continuous Deployment tool (currently I use git archive && rsync to deploy)
- Security penetration tests Jenkins task
- BDD tests Jenkins tasks

I've started building (couldn't find ready to use one) a simple front-end for having our customers a way to write down user stories (my intention is to use behat/gherkin) and I need to define/build a task for performing those tests in Jenkins.

What do you guys do and use for these?

Cheers, Vlad

Re: CI, CD etc.

Posted: Sun Jun 09, 2013 8:59 am
by VladSun
I am about to start using Liquibase for having "git-tracked" DB migrations. What I really liked in it is:
- context property (i.e. deploy target)
- the "precondition" checks
- the dbDoc feature
- the diffChangeLog feature
- the out-of-the-box Ant task

Have any of you had some experience with Liquibase?

http://www.liquibase.org/quickstart.html
http://earlyandoften.wordpress.com/2010 ... liquibase/

Re: CI, CD etc.

Posted: Sat Nov 02, 2013 12:43 am
by josh
Never used that tool, I use http://phinx.org/

If I were you I'd pick my battles. I think using DB migrations is 1000x more important than unit testing, when it comes to "forcing" a good practice on a less experienced team. Of course in a perfect world you could have both. The CI server isn't necessary, especially since you're the only one writing tests anyways, and it seems like having that is creating the need for more tools. What's going to happen when the CI server fails because no one cares about the tests but you? I think there has to be a consensus to use the tools, for these tools to help - otherwise introducing new tools hurts. In teams where there's no clear direction, adding more tools hurts. In my experience you end up with different frameworks - I've seen one guy using HAML, another using smarty, another using ZF1, someone else writing their own MVC, other people doing templating in client side - all in one project. Picking one of those approaches can help, but mixing & matching hurts the project.