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

A Pragmatic Approach to Continuous Delivery

A Pragmatic Approach to Continuous Delivery

Talk from jDays 2012

ivargrimstad

December 03, 2012
Tweet

More Decks by ivargrimstad

Other Decks in Programming

Transcript

  1. • JUnit • Ant • Continuous Integration • Maven •

    Continuous Delivery A Little History jDays 2012 Ivar Grimstad 4
  2. Individuals and interactions over processes and tools Working software over

    comprehensive documentation Customer collaboration over contract negotiation Responding to change over following a plan Agile Manifesto jDays 2012 Ivar Grimstad 5 http://www.agilemanifesto.org/
  3. Our highest priority is to satisfy the customer through early

    and continuous delivery of valuable software. Welcome changing requirements, even late in development. Agile processes harness change for the customer's competitive advantage. Deliver working software frequently, from a couple of weeks to a couple of months, with a preference to the shorter timescale. Business people and developers must work together daily throughout the project. Build projects around motivated individuals. Give them the environment and support they need, and trust them to get the job done. The most efficient and effective method of conveying information to and within a development team is face-to-face conversation. Working software is the primary measure of progress. Agile processes promote sustainable development. The sponsors, developers, and users should be able to maintain a constant pace indefinitely. Continuous attention to technical excellence and good design enhances agility. Simplicity--the art of maximizing the amount of work not done--is essential. The best architectures, requirements, and designs emerge from self-organizing teams. At regular intervals, the team reflects on how to become more effective, then tunes and adjusts its behavior accordingly. Principles behind the Agile Manifesto jDays 2012 Ivar Grimstad 6 http://www.agilemanifesto.org/
  4. Our highest priority is to satisfy the customer through early

    and continuous delivery of valuable software. Principles behind the Agile Manifesto jDays 2012 Ivar Grimstad 7 http://www.agilemanifesto.org/ Welcome changing requirements, even late in development. Agile processes harness change for the customer's competitive advantage. Deliver working software frequently, from a couple of weeks to a couple of months, with a preference to the shorter timescale. Business people and developers must work together daily throughout the project. Build projects around motivated individuals. Give them the environment and support they need, and trust them to get the job done. The most efficient and effective method of conveying information to and within a development team is face-to-face conversation. Working software is the primary measure of progress. Agile processes promote sustainable development. The sponsors, developers, and users should be able to maintain a constant pace indefinitely. Continuous attention to technical excellence and good design enhances agility. Simplicity--the art of maximizing the amount
  5. • Build Binaries Once • One Process Deploy • Test

    Deployments • Flow • Fail -> Stop the Line The Deployment Pipeline jDays 2012 Ivar Grimstad 9
  6. • Commit • Analysis • Deploy • Test • Deliver

    Remember that this is a pragmatic approach Deployment Pipeline Stages jDays 2012 Ivar Grimstad 10
  7. • Compile • Test • Create binaries for later use

    The Commit Stage - Steps jDays 2012 Ivar Grimstad 11
  8. • Test Coverage • Duplications • Complexity • Coupling •

    Rule Compliance • Code Style The Analysis Stage - Metrics jDays 2012 Ivar Grimstad 14
  9. • Copy Artifact from Commit Stage • Deploy to Test

    Environment The Deploy Stage - Steps jDays 2012 Ivar Grimstad 17
  10. • Choose a subset of tests to run • Run

    tests most likely to fail first The Test Stage - Steps jDays 2012 Ivar Grimstad 19
  11. • Copy Artifact from Commit Stage • Deliver according to

    agreement The Deliver Stage - Steps jDays 2012 Ivar Grimstad 22
  12. • Use Maven Release Plugin – mvn release:branch or mvn

    release:prepare – mvn release:perform • Jenkins Fingerprint Functionality What about Versioning? jDays 2012 Ivar Grimstad 26
  13. • Blue/Green Deployments • Canary Releasing • Feature Toggles •

    Branch by Abstraction Designing for Continuous Delivery jDays 2012 Ivar Grimstad 28
  14. • Manual Deployment • Deployment to production-like environment after development

    is complete • Manual configuration of production environment • Excessive Branching Antipatterns jDays 2012 Ivar Grimstad 29
  15. • Every change should trigger the feedback process • Fast

    Feedback • Act on the Feedback To Sum Up jDays 2012 Ivar Grimstad 30
  16. • Jenkins – Build Pipeline Plugin – Copy Artifact Plugin

    • Sonar • Maven – Maven Release Plugin – Maven Javadoc Plugin – Maven Glassfish Plugin (similar for all app servers) Tools jDays 2012 Ivar Grimstad 31
  17. • Define your pipeline steps • Set up the jobs

    • Start configuring • Evolve your pipeline Where to start? jDays 2012 Ivar Grimstad 32
  18. • Architecting for Continuous Delivery Axel Fontaine Tuesday 14:40 •

    Building a Continuous Deployment Pipeline with Maven Alan Parkinson Wednesday 13:30 More at jDays jDays 2012 Ivar Grimstad 33