![Page 1: Ben Reich - Continuous Integration Best Practices in Agile Environments](https://reader033.vdocuments.us/reader033/viewer/2022061217/54b520164a7959711c8b4576/html5/thumbnails/1.jpg)
Continuous Integration
Best Practices in Agile Environments
Ben Reich @ AgileSparks
![Page 2: Ben Reich - Continuous Integration Best Practices in Agile Environments](https://reader033.vdocuments.us/reader033/viewer/2022061217/54b520164a7959711c8b4576/html5/thumbnails/2.jpg)
Who Am I?
www.linkedin.com/in/benreichE-mail:
15 years leadership experience in software development & startup operations with Gantt charts
7 Years of searching and finding ways to improve life quality, predictability and efficiency
![Page 3: Ben Reich - Continuous Integration Best Practices in Agile Environments](https://reader033.vdocuments.us/reader033/viewer/2022061217/54b520164a7959711c8b4576/html5/thumbnails/3.jpg)
Ideas and best practices on implementing continuous integration in an agile way
What is this about?
![Page 4: Ben Reich - Continuous Integration Best Practices in Agile Environments](https://reader033.vdocuments.us/reader033/viewer/2022061217/54b520164a7959711c8b4576/html5/thumbnails/4.jpg)
Continuous Integration 101
CodeRepositor
y
Production Clone
Build
AutoTest
ChangeAuto
Builder
FeedbackPublish
Build
• Small and Frequent changes• Fast and immediate build• Immediate feedback
![Page 5: Ben Reich - Continuous Integration Best Practices in Agile Environments](https://reader033.vdocuments.us/reader033/viewer/2022061217/54b520164a7959711c8b4576/html5/thumbnails/5.jpg)
So, why is it agile?
ContinuousIntegration
Small
Iteratio
ns
RapidDelivery
Working
Software
Encourage
Cooperation
![Page 6: Ben Reich - Continuous Integration Best Practices in Agile Environments](https://reader033.vdocuments.us/reader033/viewer/2022061217/54b520164a7959711c8b4576/html5/thumbnails/6.jpg)
But: Is a bunch of programmers constantly mixing some code
together really getting us where we want to be?
![Page 7: Ben Reich - Continuous Integration Best Practices in Agile Environments](https://reader033.vdocuments.us/reader033/viewer/2022061217/54b520164a7959711c8b4576/html5/thumbnails/7.jpg)
The Challenges of CI
• Distance from the end user• Automatic tests are difficult• Large and complex products• Diverse organization• Insufficient review• Inter-team synchronization
issues
![Page 8: Ben Reich - Continuous Integration Best Practices in Agile Environments](https://reader033.vdocuments.us/reader033/viewer/2022061217/54b520164a7959711c8b4576/html5/thumbnails/8.jpg)
You know its becoming
irrelevant if:
Nobody is consuming it and
people are waiting for your “real release”
![Page 9: Ben Reich - Continuous Integration Best Practices in Agile Environments](https://reader033.vdocuments.us/reader033/viewer/2022061217/54b520164a7959711c8b4576/html5/thumbnails/9.jpg)
Escaped bugsInstant ResponseWhat Happens here? And here?
![Page 10: Ben Reich - Continuous Integration Best Practices in Agile Environments](https://reader033.vdocuments.us/reader033/viewer/2022061217/54b520164a7959711c8b4576/html5/thumbnails/10.jpg)
![Page 11: Ben Reich - Continuous Integration Best Practices in Agile Environments](https://reader033.vdocuments.us/reader033/viewer/2022061217/54b520164a7959711c8b4576/html5/thumbnails/11.jpg)
“Holy Place” Culture – Done means Released
• Identify the “holy place”• Designated delivery
target• Always up and running• As Releasable as possible• Replica of Production• Demo-able and
accessible
• Identify the Stakeholder• Represents the customer• Is motivated to succeed• Can deliver UAT• Has the bandwidth to
review
![Page 12: Ben Reich - Continuous Integration Best Practices in Agile Environments](https://reader033.vdocuments.us/reader033/viewer/2022061217/54b520164a7959711c8b4576/html5/thumbnails/12.jpg)
Put it where its accessible, demoable, won’t break but will be updated regularly in days
![Page 13: Ben Reich - Continuous Integration Best Practices in Agile Environments](https://reader033.vdocuments.us/reader033/viewer/2022061217/54b520164a7959711c8b4576/html5/thumbnails/13.jpg)
The Delivery Gap
• Manual testing takes longer and there is no synchronization
• Developers need to program before testers need to test
• Large projects need constant integration testing
• Too many changes can disrupt the flow
![Page 14: Ben Reich - Continuous Integration Best Practices in Agile Environments](https://reader033.vdocuments.us/reader033/viewer/2022061217/54b520164a7959711c8b4576/html5/thumbnails/14.jpg)
Ingredients to Fill the GAP
WIP Limits Time Box
Agile Communication
![Page 15: Ben Reich - Continuous Integration Best Practices in Agile Environments](https://reader033.vdocuments.us/reader033/viewer/2022061217/54b520164a7959711c8b4576/html5/thumbnails/15.jpg)
Case Study – The Demo Cycle
• 8 man team• 1 month sprint• 1 week demo cycle• 1 week deployment cycle• Typically 2-4 user stories deployed per
weekDay 1 Day 2 Day 3 Day 4 Day 5
CoordinateCommitTest
CommitTest
CommitTest
CommitTestEvaluateFreeze
DemoDecideDeploy
![Page 16: Ben Reich - Continuous Integration Best Practices in Agile Environments](https://reader033.vdocuments.us/reader033/viewer/2022061217/54b520164a7959711c8b4576/html5/thumbnails/16.jpg)
The Continuous Delivery Train Station Cycle
The Holy Trunk
Branch
Integration Area
WeeklyBranch
Deploy
Holy PlaceTeam
Commits
Tests
BranchUpdated
WeeklyBranch Deploy
Commits
Tests
?
![Page 17: Ben Reich - Continuous Integration Best Practices in Agile Environments](https://reader033.vdocuments.us/reader033/viewer/2022061217/54b520164a7959711c8b4576/html5/thumbnails/17.jpg)
The Continuous Delivery Train Station Cycle
The Holy Trunk
Branch
Integration Area
WeeklyBranch
Holy PlaceTeam
Commits
Tests
BranchLast Good
BranchDeploy
Commits
Tests
?XRejectWhew!!
![Page 18: Ben Reich - Continuous Integration Best Practices in Agile Environments](https://reader033.vdocuments.us/reader033/viewer/2022061217/54b520164a7959711c8b4576/html5/thumbnails/18.jpg)
The Continuous Delivery Train Station Cycle
The Holy Trunk
Branch
Integration Area
WeeklyBranch
Holy PlaceTeam
Commits
Tests
BranchLast Good
Branch
Commits
Tests
?XReject
XReject
![Page 19: Ben Reich - Continuous Integration Best Practices in Agile Environments](https://reader033.vdocuments.us/reader033/viewer/2022061217/54b520164a7959711c8b4576/html5/thumbnails/19.jpg)
![Page 20: Ben Reich - Continuous Integration Best Practices in Agile Environments](https://reader033.vdocuments.us/reader033/viewer/2022061217/54b520164a7959711c8b4576/html5/thumbnails/20.jpg)
![Page 21: Ben Reich - Continuous Integration Best Practices in Agile Environments](https://reader033.vdocuments.us/reader033/viewer/2022061217/54b520164a7959711c8b4576/html5/thumbnails/21.jpg)
Swarm!!
![Page 22: Ben Reich - Continuous Integration Best Practices in Agile Environments](https://reader033.vdocuments.us/reader033/viewer/2022061217/54b520164a7959711c8b4576/html5/thumbnails/22.jpg)
Electronic WIP dashboard
![Page 23: Ben Reich - Continuous Integration Best Practices in Agile Environments](https://reader033.vdocuments.us/reader033/viewer/2022061217/54b520164a7959711c8b4576/html5/thumbnails/23.jpg)
Large Projects - Scrum of Scrum• Frequency – 1 to 3 days
• What is discussed?– What has your team done since we last met?– What will your team do before we meet again?– Is anything slowing your team down or getting in their way?– Are you about to put something in another team’s way?
• The last two items will feature:– Broken APIs– Synchronization issues– Current build status– Story and Epic issues
![Page 24: Ben Reich - Continuous Integration Best Practices in Agile Environments](https://reader033.vdocuments.us/reader033/viewer/2022061217/54b520164a7959711c8b4576/html5/thumbnails/24.jpg)
Working with Large Remote Teams
Is it Impossible?
RailsPython
Django
Linux jQuery
![Page 25: Ben Reich - Continuous Integration Best Practices in Agile Environments](https://reader033.vdocuments.us/reader033/viewer/2022061217/54b520164a7959711c8b4576/html5/thumbnails/25.jpg)
Learning from Open Source
• Manage by committee• Dedicate resources to CI• Set strict rules and enforce
them• Enforce and encourage
communication• Never go home with a broken
build
![Page 26: Ben Reich - Continuous Integration Best Practices in Agile Environments](https://reader033.vdocuments.us/reader033/viewer/2022061217/54b520164a7959711c8b4576/html5/thumbnails/26.jpg)
Rules of engagement - Example
![Page 27: Ben Reich - Continuous Integration Best Practices in Agile Environments](https://reader033.vdocuments.us/reader033/viewer/2022061217/54b520164a7959711c8b4576/html5/thumbnails/27.jpg)
Github Change log – Social coding
![Page 28: Ben Reich - Continuous Integration Best Practices in Agile Environments](https://reader033.vdocuments.us/reader033/viewer/2022061217/54b520164a7959711c8b4576/html5/thumbnails/28.jpg)
Source Control Management Recipes
Eshel Brosh
1 trunk – No Deviations
Quiz - Which Tree Looks More Target Oriented?
![Page 29: Ben Reich - Continuous Integration Best Practices in Agile Environments](https://reader033.vdocuments.us/reader033/viewer/2022061217/54b520164a7959711c8b4576/html5/thumbnails/29.jpg)
Incremental changes
Main Trunk
Rev 1
Feat. 1 Rev 3Rev 2
Feat. 1 Rev 3
• Rule no. 1 – Do not branch for features.• Rule no. 2 – If you breached Rule no. 1:
• Merge quickly – Put an expiration date on branches
• Only one level• Police the branches• Pull Trunk before merging• Test branches before merging
![Page 30: Ben Reich - Continuous Integration Best Practices in Agile Environments](https://reader033.vdocuments.us/reader033/viewer/2022061217/54b520164a7959711c8b4576/html5/thumbnails/30.jpg)
Hiding New Features
• Not usually recommended
• Better than Branching– Gradual integration– Passes some tests– Lower Stabilization Cost
![Page 31: Ben Reich - Continuous Integration Best Practices in Agile Environments](https://reader033.vdocuments.us/reader033/viewer/2022061217/54b520164a7959711c8b4576/html5/thumbnails/31.jpg)
Branching by Abstraction
Logic Functionality
Persistence Functionality
Spaghet
ti
![Page 32: Ben Reich - Continuous Integration Best Practices in Agile Environments](https://reader033.vdocuments.us/reader033/viewer/2022061217/54b520164a7959711c8b4576/html5/thumbnails/32.jpg)
Branching by AbstractionAbst
ract
ion
![Page 33: Ben Reich - Continuous Integration Best Practices in Agile Environments](https://reader033.vdocuments.us/reader033/viewer/2022061217/54b520164a7959711c8b4576/html5/thumbnails/33.jpg)
Branching by Abstraction
Old Layer
Repla
cem
ent
New Layer
![Page 34: Ben Reich - Continuous Integration Best Practices in Agile Environments](https://reader033.vdocuments.us/reader033/viewer/2022061217/54b520164a7959711c8b4576/html5/thumbnails/34.jpg)
Branching by AbstractionRep
lace
men
t
![Page 35: Ben Reich - Continuous Integration Best Practices in Agile Environments](https://reader033.vdocuments.us/reader033/viewer/2022061217/54b520164a7959711c8b4576/html5/thumbnails/35.jpg)
Auto testing – The Key to Success
Test Auto-mated?
Build Tests
Unit Tests
Functional Test
Non-Functional tests
Acceptance tests
• Automate in order• Automate the happy
path first• Maximize coverage with
data and not complex scripting
• Look for repeating manual tests
• Spec test together with PO
• Automate when functionality is frozen
![Page 36: Ben Reich - Continuous Integration Best Practices in Agile Environments](https://reader033.vdocuments.us/reader033/viewer/2022061217/54b520164a7959711c8b4576/html5/thumbnails/36.jpg)
What Next?
• Visualize your value stream• Choose tools
– Continuous Integration– Auto testing– Deployment
• Invest in automatic testing• Tailor fit a process to your
needs
![Page 37: Ben Reich - Continuous Integration Best Practices in Agile Environments](https://reader033.vdocuments.us/reader033/viewer/2022061217/54b520164a7959711c8b4576/html5/thumbnails/37.jpg)
www.linkedin.com/in/benreichE-mail:
Questions?
Thank You!