Continuous Integration and Builds


Published on

The presentation from my talk on Continuous Integration and Builds at XP Days Indore 2010. The target audience was MCA students, faculty and members of IT industry in and around Indore.

Published in: Technology
  • Be the first to comment

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Continuous Integration and Builds

  1. 1. Continuous Integration & Builds <ul><li>25th Apr 2010 </li></ul>Bhavin Javia, Senior Consultant, ThoughtWorks Indore 2010
  2. 2. Agenda <ul><li>What is build and deployment ? </li></ul><ul><li>Source/Version Control </li></ul><ul><ul><li>What is Source/Version Control ? </li></ul></ul><ul><ul><li>Source Control Process </li></ul></ul><ul><ul><li>Source Control Tools </li></ul></ul><ul><li>What is Continuous Integration (CI) ? </li></ul><ul><li>CI Process </li></ul><ul><li>CI Process in a team </li></ul><ul><li>CI Practices </li></ul><ul><li>Why CI ? </li></ul><ul><li>CI Tools </li></ul><ul><li>Demo </li></ul><ul><li>References </li></ul><ul><li>Q & A </li></ul>
  3. 3. What is a build and deployment ? <ul><li>Clean, Compile, Test, Package (Build) and Copy the packaged code to a remote server and start the app (Deploy) </li></ul><ul><li>Tools available to perform a build/deployment </li></ul><ul><ul><li>Ant, Maven (Java) </li></ul></ul><ul><ul><li>Nant (.NET) </li></ul></ul><ul><ul><li>Make (C++) </li></ul></ul><ul><ul><li>Rake, Capistrano (Ruby) </li></ul></ul><ul><li>IDEs (like Eclipse) use these build tools behind the scenes </li></ul><ul><li>IDE itself is NOT a build/deployment tool </li></ul>
  4. 4. What is Source/Version Control ? <ul><li>Single repository to store “master copy” of all source code </li></ul><ul><ul><li>Often on a remote machine </li></ul></ul><ul><ul><li>Daily backups taken for disaster recovery </li></ul></ul><ul><li>Everyone pulls down a local “working copy” of the code from the repository (checkout) </li></ul><ul><li>All changes are posted back to the repository as an “incremental change” (commit) </li></ul><ul><li>Every change gets “unique a version number” </li></ul><ul><li>You can restore your working copy to any version (update) </li></ul>
  5. 5. Source Control Process master/ (trunk) SCM Repo Bob Alice Ted Checkout (99) Build & Commit (101) Build & Commit (102) Build & Commit (103) Build & Commit (100) Checkout (100) Update (101) Checkout (102)
  6. 6. Source Control Tools <ul><li>CVS </li></ul><ul><li>Subversion </li></ul><ul><li>Perforce </li></ul><ul><li>Git </li></ul><ul><li>VSS </li></ul><ul><li>Others </li></ul>
  7. 7. What is Continuous Integration (CI) ? “ Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily - leading to multiple integrations per day ….this approach leads to significantly reduced integration problems and allows a team to develop cohesive software more rapidly” - Martin Fowler (Chief Scientist @ ThoughtWorks)
  8. 8. CI Process
  9. 9. CI Process in a team master/ (trunk) SCM Repo Bob Alice Ted CI server 99 101 102 Build 100 Build 102 Build 103 103 100 100 101 102 App server Deploy 103
  10. 10. CI Practices
  11. 11. Why CI ? <ul><li>Collective code ownership </li></ul><ul><li>Faster feedback to developer </li></ul><ul><li>Quality Improvement with tests </li></ul><ul><li>Application/Tests run on prod like system </li></ul><ul><li>Integrates all moving parts </li></ul><ul><li>Frequent deployments – More feedback </li></ul><ul><li>Metrics – Feedback on code quality </li></ul><ul><li>Reduced Risk </li></ul>
  12. 12. CI Tools <ul><li>Open Source </li></ul><ul><ul><li>CruiseControl – Java, .NET, Ruby </li></ul></ul><ul><ul><li>Hudson </li></ul></ul><ul><li>Commercial Products </li></ul><ul><ul><li>Cruise (from ThoughtWorks Studios) </li></ul></ul><ul><ul><li>TeamCity (from JetBrains) </li></ul></ul><ul><ul><li>Bamboo (from Atlassian) </li></ul></ul>
  13. 13. Demo CruiseControl (Java) and CruiseControl.rb (Ruby) (20 mins)
  14. 14. CruiseControl
  15. 15. CruiseControl.NET
  16. 16. CruiseControl.rb
  17. 17. Hudson © ThoughtWorks 2008
  18. 18. Features of CI tools <ul><li>Integration with Source Control systems </li></ul><ul><li>Integration with Build tools </li></ul><ul><li>Integration with Project Management tools </li></ul><ul><li>Notifications – via Email, RSS, IM etc </li></ul><ul><li>Dashboard </li></ul><ul><li>Metrics Collection – via internal/external tools </li></ul><ul><li>Scalability – via Distributed/Cloud computing </li></ul><ul><li>Extensibility via Plugins/APIs </li></ul>
  19. 19. References <ul><li> </li></ul><ul><li> </li></ul><ul><li> </li></ul><ul><li> </li></ul><ul><li> </li></ul><ul><li> </li></ul><ul><li> </li></ul>
  20. 20. Q & A Contact: [email_address]