AgileLINC Continous Slides by Daniel Harp

22
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

description

 

Transcript of AgileLINC Continous Slides by Daniel Harp

Page 1: 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

Page 2: AgileLINC Continous Slides by Daniel Harp

Why Continuous Integration?

“If you had a button that told you whether everything in the system was working, how often would you press it?”

Page 3: AgileLINC Continous Slides by Daniel Harp

Agile/Scrum Integration

Page 4: AgileLINC Continous Slides by Daniel Harp

Continuous Integration

Contrary to popular belief, continuous integration is an attitude, not a tool.

--- James Shore, “The Art of Agile”

Installing Jenkins ≠ Continuous Integration

Page 5: AgileLINC Continous Slides by Daniel Harp

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…)

Page 6: AgileLINC Continous Slides by Daniel Harp

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?

Page 7: AgileLINC Continous Slides by Daniel Harp

Continuous Integration

Key Practice #4:

Make the build self testing

Compiled, Linked, Packaged… But does it “work”?

Automated Testing is essential to Continuous Integration

Page 8: AgileLINC Continous Slides by Daniel Harp

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

Page 9: AgileLINC Continous Slides by Daniel Harp

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)

Page 10: AgileLINC Continous Slides by Daniel Harp

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

Page 11: AgileLINC Continous Slides by Daniel Harp

X

Branches

Trunk

Branch 1

Branch 2

What we tell ourselves branches look likeWhat branches actually look like…

Branch 1

Branch 2

Page 12: AgileLINC Continous Slides by Daniel Harp

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”)

Page 13: AgileLINC Continous Slides by Daniel Harp

Branches

Trunk

If you insist on branching, merge often (daily)

Page 14: AgileLINC Continous Slides by Daniel Harp

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

Page 15: AgileLINC Continous Slides by Daniel Harp

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

Page 16: AgileLINC Continous Slides by Daniel Harp

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

Page 17: AgileLINC Continous Slides by Daniel Harp

Continuous Integration

Key Practice #8:

Binary Integrity

Key Practice #9:

Test in a clone of production

Page 18: AgileLINC Continous Slides by Daniel Harp

Continuous Integration

Key Practice #10:

Make it easy to get the latest executable

Working software over comprehensive documentation

Page 19: AgileLINC Continous Slides by Daniel Harp

Continuous Integration

Key Practice #11:

Everyone can see what’s happening

Page 20: AgileLINC Continous Slides by Daniel Harp

Adopting Continuous Integration

Focus changes on Organizational, Architectural & Process

- not -Tools, Code, Infrastructure

Page 21: AgileLINC Continous Slides by Daniel Harp

Adopting Continuous Integration

Get Measurable ChangeAs Soon As Possible

Page 22: AgileLINC Continous Slides by Daniel Harp

Adopting Continuous Integration

Create a culture of Continuous Improvement