AgileLINC Continous Slides by Daniel Harp
-
Upload
barry-gavril -
Category
Technology
-
view
204 -
download
0
description
Transcript of AgileLINC Continous Slides by Daniel Harp
Waterfall Integration
Waterfall Integration Issues• Poor planning/design may require
extensive redesign• Hard to predict how long it will take• Hard to determine how close you are to
completing it• Easy for earlier project delays to cause
Integration to start already behind schedule and be rushed
• Defect root cause is hard to identify because of the large amount of changes
Why Continuous Integration?
“If you had a button that told you whether everything in the system was working, how often would you press it?”
Agile/Scrum Integration
Continuous Integration
Contrary to popular belief, continuous integration is an attitude, not a tool.
--- James Shore, “The Art of Agile”
Installing Jenkins ≠ Continuous Integration
Continuous Integration
Key Practice #1:
Maintain a single source repository
Nobody Should Ever Ask, “Where’s the ____ properties file?”Store Everything Necessary to build your application
• Source Code• Properties Files **
• Database Schemas• Install Scripts• Build Scripts• 3rd Party Libraries **
• … everything necessary to build your application …
But do NOT include things you build…
• Binaries (Executables, Jars, Wars…)• Generated Code (WSDL to Java…)
Continuous Integration
Key Practice #2:
Automate the Build
Key Practice #3:
Keep the Build Fast• General recommendation is less than 10 Minutes• Organize build steps to get critical feedback early• Push long running later in process or multi-thread
It IS possible to do C.I. without automation, but why bother?
Continuous Integration
Key Practice #4:
Make the build self testing
Compiled, Linked, Packaged… But does it “work”?
Automated Testing is essential to Continuous Integration
Service Layer
The Agile Testing Pyramid
GUIQA Driven
Developer Driven
Test against binaries/artifacts
Test against Code
- Mocked Dependencies
ComponentIntegration Tests
Developer DrivenUnit Tests are part of development. Code without unit tests should be treated the same as code that does not compile.
Unit
Continuous Integration
Key Practice #4:
Make the build self testingEnsure that the code is tested
• Code Coverage Tools• Commit to coverage
percentage• Only represents execution, not
test quality• Code Reviews• Pair Programming• Test First / Test Driven• UTDD (Unit TDD)• ATDD (Acceptance TDD)• BDD (Behavioral)
Continuous Integration
Key Practice #5:
Everyone commits to the mainline everyday
• All new development should be done on the mainline (trunk)• Check in frequently, at least once a day• Avoid branches
• “Feature Branching is a poor man’s modular architecture”-- Dan Bodart
X
Branches
Trunk
Branch 1
Branch 2
What we tell ourselves branches look likeWhat branches actually look like…
Branch 1
Branch 2
Branches
Trunk
Bug Fix
Branch for Emergency fixes of released versions
Release ReleaseRelease Release
Bug Fix
Branches should be short lived(or it probably wasn’t an “emergency”)
Branches
Trunk
If you insist on branching, merge often (daily)
Continuous Integration
Key Practice #5:
Everyone commits to the mainline everyday
• All new development should be done on the mainline (trunk)• Check in frequently, at least once a day• Avoid branches
• “Feature Branching is a poor man’s modular architecture”-- Dan Bodart
Key ways to avoid branching:• Backwards compatibility• Feature Toggles
Continuous Integration
Key Practice #6:
Every commit should trigger a build on a build server
• Scheduled builds (nightly) is not CONTINUOUS Integration
• Builds on a build server ensure that the build isn’t tied to your local environment
Continuous Integration
Key Practice #7:
Every commit (& build) is potentially shippable
• Don’t commit code with defects• (and remember, lack of tests is a defect)
• Don’t commit new code on a broken build
• Broken builds “Stop the line”
• Don’t go home on a broken build
Continuous Integration
Key Practice #8:
Binary Integrity
Key Practice #9:
Test in a clone of production
Continuous Integration
Key Practice #10:
Make it easy to get the latest executable
Working software over comprehensive documentation
Continuous Integration
Key Practice #11:
Everyone can see what’s happening
Adopting Continuous Integration
Focus changes on Organizational, Architectural & Process
- not -Tools, Code, Infrastructure
Adopting Continuous Integration
Get Measurable ChangeAs Soon As Possible
Adopting Continuous Integration
Create a culture of Continuous Improvement