Loading presentation...

Present Remotely

Send the link below via email or IM

Copy

Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.

DeleteCancel

Make your likes visible on Facebook?

Connect your Facebook account to Prezi and let your likes appear on your timeline.
You can change this under Settings & Account at any time.

No, thanks

Unbreakable Builds -- Code Review and Continuous Integration

Internal Cisco discussion, Aug 19,2013
by

Phil Hord

on 20 August 2013

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of Unbreakable Builds -- Code Review and Continuous Integration

"Nightly" build failure

Ephemeral break with fix-up
History pollution

Potential break; not in build script


With Gerrit and Jenkins
Development cycle
Developer
Gerrit Code Review
Includes a git server with ACL extensions
Code Review
Submit for review
Right into the shared
git server (in Gerrit)
Review comments collected
inline in a web diff viewer.
Jenkins CI Server
Continuous Integration
Performs build tests, units tests, etc.
SubtleBug-v9.17
master
My patches-v1
Some other patch
My patches-v2
Review queue
Gerrit notifies reviewers
Web-based patch viewer
Review comments inline
Updated patches linked to previous versions
Base version
Patch v1
Patch v2
Merged after code is
Reviewed
Verified
Submitted
Jenkins automatically
Retrieves the patchset
Tests the patchset
Comments on the review
Jenkins becomes a review participant
Verified!
If it doesn't build,
it doesn't go in master.
No more donuts.
Shared
libs
Bootloader - no OS
Diagnostics app - no OS
Client application 1
on Linux
Client application 2
on Linux
Shared
libs
Bootloader - no OS
Diagnostics app - no OS
Client application 1
on Linux
Client application 2
on Linux
Shared
libs
Bootloader - no OS
Diagnostics app - no OS
Client application 1
on Linux
Client application 2
on Linux
Shared
libs
Bootloader - no OS
Diagnostics app - no OS
Client application 1
on Linux
Client application 2
on Linux
Shared
libs
Bootloader - no OS
Diagnostics app - no OS
Client application 1
on Linux
Client application 2
on Linux
Shared
libs
Bootloader - no OS
Diagnostics app - no OS
Client application 1
on Linux
Client application 2
on Linux
Shared
libs
Bootloader - no OS
Diagnostics app - no OS
Client application 1
on Linux
Client application 2
on Linux
Shared
libs
Bootloader - no OS
Diagnostics app - no OS
Client application 1
on Linux
Client application 2
on Linux
Shared
libs
Bootloader - no OS
Diagnostics app - no OS
Client application 1
on Linux
Client application 2
on Linux
Gerrit: Code Review
Jenkins
CI Server
Source Code Manager
http://jenkins-ci.org
http://git-scm.com/
https://code.google.com/p/gerrit/
Questions?
Code Review
Reviewers examine code changes
Testers validate unit tests
Build manager
Nightly builds, daily regression tests
Code Review Process
SCM: Source Code Manager
Clyde
Unbreakable Builds
Phil Hord hordp@cisco.com
Gerrit: Code Review
https://code.google.com/p/gerrit/
Jenkins
CI Server
http://jenkins-ci.org
Code Review and
Continuous Integration

Broken builds
Detectable errors
Build doesn't complete (errors)
Static tool reports violation
Unit tests fail

Undetectable errors
Cross-project incompatibility
Logic error

Break detection
Time
Code Review
Formal vs. lightweight
Meetings and printouts
Email, pair programming, tools
Post-commit or pre-commit?
Should be called "pre-merge"
Can be gating

Integration Build Server
Nightly
Continuous Integration
Periodic
Per-commit
Gating CI Server
"Pre-commit"

Pre-commit
Immediate feedback is easier to fix.
Immediate feedback
100% change coverage

Automatic testing
Change isolation
Squash commits
topic:
AutoFoo
topic:
BarFoo
Ephemeral breakage
topic:
BarFoo
topic:
AutoFoo
Things you need:
Some kind of automatic error detection
Simple builds
Complete builds
Static analysis
Unit tests
Functional tests
Continuous integration
Test every commit
Gatekeeper
Enforces commit isolation
"Gates" the merge on a successful commit
Topic Branches
Tools
Git
Easy, fast branching
Fast, automatic merges
Not the only tool, but some SCMs make branching more difficult
Jenkins
Continuous Integration server
Tests: Periodic, per-commit, pre-commit
Gerrit
Code Review server
Gatekeeper and Policy enforcer
Runs Git internally
Forces topic branches
Forces topic squashing (pros and cons)
Tools (alternative)
IBM Rational Team Server
GitHub Enterprise
Atlassian Crucible + Fisheye
GitLab
Collaborator (SmartBear)
PRRQ ?
email ?

Fixup
Broken
Traditional linear project history
"Clean history" policy
Discussion
Gerrit+Jenkins workflow:
Not really pre-commit
Long-chain topic branches are complicated
Interface is quirky, complicated
Constantly improving
Requires administration

Admin approval
Code review
Build/Test verification
Developer commit
master branch
Full transcript