John Ferguson Smart
Wakaleo Consulting
Continuous Integration 101
Who is this guy, anyway?
John Ferguson Smart
Consultant	
  
Trainer	
  
Mentor	
  
Author	
  
Speaker	
  
Coder
Development without CI
Lots of bugs
Infrequent
commits
Source code repository
Difficult
integration
Testing happens
late
I...
Development without CI
Lots of bugs
Infrequent
commits
Source code repository
Difficult
integration
Testing happens
late
I...
Development without CI
Lots of bugs
Infrequent
commits
Source code repository
Difficult
integration
Testing happens
late
I...
Introducing Continuous Integration
Regular
commits
Source code repository
Testing happens early
and oftenTest Server
Regul...
» Automated build
» Automated tests
» Automated code quality metrics
» …
Introducing Continuous Integration
Regular
commit...
Continuous Integration Basics
The CI Starter Kit
• What you really need…
An automated build process
An automated test suite
A Continuous Build server
A ...
You need an automated build
Build from the command line
Build consistently on any machine
Build from source on any machine
You need automated deployment
STAGING
INTEGRATION
PROD
DEV
Build ServerSource code repository
You need an automated test suite
• Unit tests
• Integration tests
• Acceptance tests
• Performance tests
• …
You need an automated test suite
You need an automated test suite
• Automated code quality metrics
• Code coverage
• Coding standards
• Potential bugs
• …
You need a version control system
• Store (almost) everything in version control
–Source code
–Test code
–Build scripts
–B...
You need a version control system
• Or use a local artifact repository for binaries
– Nexus or Artifactory for JAR files
–...
You need a version control system
Be wary of long-lived branches
Trunk-Based Development
Google builds off Trunk
You need a CI tool
You need a CI tool
Keep tabs on test results
What broke?
When did it break?
How long did it take?
What was tested?
You need a CI tool
Notify the right people fast
You need a CI tool
Keep tabs on application performance
You need a CI tool
Publish Living Documentation
You need a CI tool
Deliver Continuously
A simple build pipeline
Build	
  and	
  Fast	
  Tests
Slower	
  Tests
Acceptance	
  Tests
Code	
  Quality	
  Metrics
Relea...
THANK YOU!
John	
  Ferguson	
  Smart	
  
Email:	
  john.smart@wakaleo.com	
  
Web:	
  hJp://www.wakaleo.com	
  
TwiJer:	
 ...
Continuous Integration 101
Continuous Integration 101
Upcoming SlideShare
Loading in...5
×

Continuous Integration 101

3,080

Published on

Published in: Technology
1 Comment
16 Likes
Statistics
Notes
  • Was looking at your great deck. BTW, on slide 17, you show different repos for Maven, NuGet, and npm components. FYI, all are now supported in Nexus (including the open source version). We would love to invite you to contribute an article pointing to this deck on TheNEXUS community. http://www.sonatype.org/nexus/
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total Views
3,080
On Slideshare
0
From Embeds
0
Number of Embeds
7
Actions
Shares
0
Downloads
142
Comments
1
Likes
16
Embeds 0
No embeds

No notes for slide

Continuous Integration 101

  1. 1. John Ferguson Smart Wakaleo Consulting Continuous Integration 101
  2. 2. Who is this guy, anyway? John Ferguson Smart Consultant   Trainer   Mentor   Author   Speaker   Coder
  3. 3. Development without CI Lots of bugs Infrequent commits Source code repository Difficult integration Testing happens late Infrequent releases
  4. 4. Development without CI Lots of bugs Infrequent commits Source code repository Difficult integration Testing happens late Infrequent releases »Insufficient testing! »Slow release process! »Poor project visibility! »Issues raised are harder to fix! »…
  5. 5. Development without CI Lots of bugs Infrequent commits Source code repository Difficult integration Testing happens late Infrequent releases »Project Delays! »Unhappy clients! »High maintenance costs! »Inflexible code bases! »Harder to deliver real value! »…
  6. 6. Introducing Continuous Integration Regular commits Source code repository Testing happens early and oftenTest Server Regular automated releases Dedicated Build Server » Automated build » Automated tests » Automated code quality metrics » … Fewer bugs
  7. 7. » Automated build » Automated tests » Automated code quality metrics » … Introducing Continuous Integration Regular commits Source code repository Testing happens often Dedicated Build Server Test Server Regular automated releases Fewer bugs »Smoother integration process! »Automated regression tests! »Regular working releases! »Better visibility! »Find and fix issues faster and more easily! »…
  8. 8. Continuous Integration Basics
  9. 9. The CI Starter Kit • What you really need… An automated build process An automated test suite A Continuous Build server A source code repository
  10. 10. You need an automated build Build from the command line Build consistently on any machine Build from source on any machine
  11. 11. You need automated deployment STAGING INTEGRATION PROD DEV Build ServerSource code repository
  12. 12. You need an automated test suite • Unit tests • Integration tests • Acceptance tests • Performance tests • …
  13. 13. You need an automated test suite
  14. 14. You need an automated test suite • Automated code quality metrics • Code coverage • Coding standards • Potential bugs • …
  15. 15. You need a version control system • Store (almost) everything in version control –Source code –Test code –Build scripts –Build tools –Configuration scripts –…
  16. 16. You need a version control system • Or use a local artifact repository for binaries – Nexus or Artifactory for JAR files – NuGet mirror for .NET (e.g. MyGet) – npm_proxy_cache for Node.js – …
  17. 17. You need a version control system Be wary of long-lived branches
  18. 18. Trunk-Based Development Google builds off Trunk
  19. 19. You need a CI tool
  20. 20. You need a CI tool Keep tabs on test results What broke? When did it break? How long did it take? What was tested?
  21. 21. You need a CI tool Notify the right people fast
  22. 22. You need a CI tool Keep tabs on application performance
  23. 23. You need a CI tool Publish Living Documentation
  24. 24. You need a CI tool Deliver Continuously
  25. 25. A simple build pipeline Build  and  Fast  Tests Slower  Tests Acceptance  Tests Code  Quality  Metrics Release  Candidate Deploy  to  Test Deploy  to  UAT Deploy  to  Produc=on 1.0.1
  26. 26. THANK YOU! John  Ferguson  Smart   Email:  john.smart@wakaleo.com   Web:  hJp://www.wakaleo.com   TwiJer:  wakaleo
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×