@paul_boocock [email protected]
Continuously Delivering Software to Big Brands
Step 1.Introduce myself!
Step 2.Talk about the fundamentals
Step 3.How do we do it at Codeweavers?
Continuously Delivering Software to Big Brands
• Some Northern fella…
Academy Leader
Who am I?
Delivering software to a production environment is often one of the most riskiest and stressful parts of
the software lifecycle.
Delivering Software
How can we:•Reduce Risk?•Eliminate Tedious Work?•Increase Confidence?
For many organisations, releasing software is:•Manually Intensive•Error Prone•Risky
Big Brands
How long would it take your business to safely deploy a change that involves one line of code to the
production environment?
Within Six Months?
Question
How long would it take your business to safely deploy a change that involves one line of code to the
production environment?
Within Three Months?
Question
How long would it take your business to safely deploy a change that involves one line of code to the
production environment?
Within One Month?
Question
How long would it take your business to safely deploy a change that involves one line of code to the
production environment?
Within One Week?
Question
How long would it take your business to safely deploy a change that involves one line of code to the
production environment?
Within One Day?
Question
How long would it take your business to safely deploy a change that involves one line of code to the
production environment?
Within One Hour?
Question
How long would it take your business to safely deploy a change that involves one line of code to the
production environment?
Within 30 Minutes?
Question
How long would it take your business to safely deploy a change that involves one line of code to the
production environment?
Within 15 Minutes?
Question
How long would it take your business to safely deploy a change that involves one line of code to the
production environment?
How Low?!?
Question
How long would it take your business to safely deploy a change that involves one line of code to the
production environment?
This is known as your Cycle Time
Question
Lowering Cycle Time is something to strive for
Can be achieved through automationCreating a reliable, predictable, visible and largely automated process with well understood risks.
Cycle Time
Technologies
The foundation of what we will talk about today
Vital to have a solid CI environment before movingonto continuous delivery
Continuous Integration
Source ControlCommit Frequently
Automatic BuildsAutomated Tests
Staging Environment
Continuous Integration
Build FastBuild Every Commit
Make it visible
Source ControlCommit Frequently
Automatic BuildsAutomated Tests
Staging Environment
Continuous Integration
Build FastBuild Every Commit
Make it visible
Unable to commit when build is brokenRun all tests before committingNever go home on a broken buildBe ready to revertDon’t comment out failing testsTake responsibility
The Essentials
CI Build Process
Total Build Time: ~4 Minutes
The build and tests should be fast – go parallel if possibleTest coverage should be high – aim for 75%+If it breaks we cannot continue
Prevents defects getting to production
Early Feedback
Every commit should be safe enough to be deployed to productionUsually leads to better code quality and maintainabilityCan use feature toggles if required but try to avoid
Every commit can be released
Manual DeploymentHas to be manually tested to ensure everything works
Leads to tense release day
Prone to human error
Take hours assuming everything goes well
Deployment
The alternative…Automate your deploys
Only human element is to pick the environment and press deploy
Will lead to a repeatable and reliable deployment process
No reliance on the deploy expert at work
Deployment
Isn’t just the way we deploy, it’s essential to our business
• Commit and build• Deploy to staging environment• Deploy to live
Continuous Delivery
Every commit should be deployableSo deploy them!Get early feedback on feature from clientsEnsure any issues can be found earlier
Deploy Frequently
Day CommitsStaging Deploy
Production Deploy
Friday 72 181 14Thursday 126 115 23Wednesday 134 86 25Tuesday 94 37 11Monday 131 62 27
Deliverables are not done until they are at least in production
Kanban board reflects this
Only done when delivering value to the customer
Done when released
Ensure that everybody is involved in deploying their codeTake ownership of your own work
Fail early / feedback fast so you can fix it quickly
No one person responsible for deploymentRemove the barriers in your teams
Everybody is responsible
So with all these features in place, how does it all stitch together?
Developer Journey – From Story to Live
Move on to next MMF(Minimum Marketable Feature)
Developer Journey – From Story to Live
Write some code!
Developer Journey – From Story to Live
Commit Frequently
Developer Journey – From Story to Live
Monitor the build on CI (~4 Minutes)CruiseControl.NET & Nant scripts automate this
Developer Journey – From Story to Live
If successful deploy to staging (~2 Minutes)
Developer Journey – From Story to Live
If successful deploy to production (~4 Minutes)
Developer Journey – From Story to Live
And we’re live! If everything goes smoothly, from commit to production in 15 minutes
Developer Journey – From Story to Live
Keep things visible
Keep things visible
Started tracking Cycle Time in 2016 to see how long it takes a code change to go live
Currently averages at 7.32 hours from commit to live
Cycle Time
What does it give us?Iterate & deliver quicklyReduces bottlenecks in the delivery pipelineIncreases visibilityWork Sustainably
Continuous Delivery helps towards working with Sustainable Pace
Sustainable Pace
What does it give us?Iterate & delivery quicklyReduce bottlenecksIncreases visibilityWork Sustainably
And occasionally…Break things (but we can fix them quickly!)
What do our clients get from it?
Continuous DeliveryJez Humble & David FarleyISBN13: 978-0-321-60191-9
The Bible