Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Continuous Integration and Deployment with PHP

Continuous Integration and Deployment with PHP

You've no doubt heard the terms before. This short presentation goes over why you should consider Continuous Integration/Deployment and how it can make your life as a developer easier and more productive.

Samantha Quiñones

June 11, 2013
Tweet

More Decks by Samantha Quiñones

Other Decks in Technology

Transcript

  1. T ypical Build Process • Update config files • Create

    SQL scripts to update the DB • Run tests
  2. Building & Pushing by Hand Sucks • Error prone •

    Encourages dirty hacks • Time-consuming • Integration Hell
  3. You might have a deployment problem if... • “I don't

    know, it worked on my machine.” • “Who deployed X? X wasn't ready for prod!” • “Well, in production, you have to...” • PackageRepository_20130313.php
  4. What's the Point? • Build one thing & integrate it

    immediately • When an enhancement is made, software is ready to ship • Building is automated and repeatable
  5. Getting Started • Automate your build (Ant, phing, make, rake,

    etc) • Let your tools handle your config changes <property name="env" value="default" /> <property file="build/properties/build.properties.${env}" />
  6. Automate Database Changes • If you use an RDBMS and

    don't use a migration tool, start! • Many major frameworks • Liquibase, dbdeploy, alembic (it's not just for python!)
  7. What Does a Good Build Look Like? • Tests Pass

    • Code Coverage • Coding Standards • Static Analysis • Documentation
  8. ABCs of Continuous Deployment A lways B e s C

    ipping (Anglo-Saxons need love too!)
  9. Deployment is Tricky • Deploy Test Commit or Rollback →

    → • Versioned directories & symlinks
  10. It's 3 am. Do you know where your hackers are?

    • When deployments fail, back them out! • Fixing code in production is a terrible idea • Missing a deadline sucks. Releasing crappy code sucks more.
  11. The Beating Agile Heart User story Enhancement Release → →

    • Testable, reproducible results • Be confident in your product • Give end-users a window in to dev cycle
  12. Next Steps? • “Continuous Integration” by Martin Fowler http://bit.ly/KEgGa •

    Chris Hartjes' Grumpy Learning http://bit.ly/11fxCcY • Marcelo Gornstein's Blog http://bit.ly/192nVCw • Email or tweet me!