Jenkins CI

30,448 views
30,021 views

Published on

Introduction to Jenkins (Hudson) Continuous Integration Server

Published in: Technology
0 Comments
38 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
30,448
On SlideShare
0
From Embeds
0
Number of Embeds
5,060
Actions
Shares
0
Downloads
1,095
Comments
0
Likes
38
Embeds 0
No embeds

No notes for slide

Jenkins CI

  1. 1. Hudson CI haocheng 本著作係依據創用 CC Attribution-ShareAlike 3.0 Unported 授權條款進 行授權。如欲瀏覽本授權條款之副本,請造訪 http://creativecommons. org/licenses/by-sa/3.0/ ,或寄信至 Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA 。
  2. 2. Quick Survey
  3. 3. How many of you have written Unit tests?
  4. 4. How many of you are doing Continuous Integration?
  5. 5. How many of you are using Hudson?
  6. 6. 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. -- Martin Fowler
  7. 7. Why CI? Rapid Feedback Reduced Risk Collective Ownership Continuous Deployment Offload from people
  8. 8. Best Practices of CI Single Source Repository Commit often Make Your Build Self-Testing Automate the Build Build fast
  9. 9. Hudson Extensible continuous integration server
  10. 10. What is Hudson? Open-source CI server Easy to install and use Extensibility Over 330+ plugins (230+ last year) More than 20,000 installations
  11. 11. Why Hudson? GUI to manage Strong community and eco-system Distributed builds Open Source and Free!
  12. 12. Configuration in Cruise Control Configuration Reference of Cruise Control
  13. 13. and there are more below...
  14. 14. Lots of people are using Hudson... from Koshuke's slide: Continuous Integration in the Cloud with Hudson, JavaOne 2009
  15. 15. Including Yahoo ;-)
  16. 16. CI Tools survey in 2009 http://www.wakaleo.com/resources/polls
  17. 17. CI Tools survey in 2010 http://www.wakaleo.com/resources/polls
  18. 18. Another CI Tools Survey in 2010
  19. 19. Hudson is still growing...
  20. 20. And the Job Trend is increasing
  21. 21. Basic Features Notice a change Check out source code Execute builds/tests Record and publish results Notify developers
  22. 22. CI Overview from Continuous integration with Hudson
  23. 23. Notice a change Build Periodically Depend on other projects Poll SCM Subversion Push vs. Pull
  24. 24. Check out source code Subversion CVS Git Mercurial Perforce
  25. 25. Execute builds/tests Java Ant, Maven, Gradle .Net MSBuild, PowerShell Shell Script Python, Ruby, Groovy
  26. 26. Record and publish results JUnit TestNG Findbugs Cobertura Checkstyle PMD
  27. 27. Job Status Job State: Job Stability:
  28. 28. Findbugs Integration
  29. 29. Cobertura Integration
  30. 30. Project Relationship
  31. 31. Notify developers Twitter email RSS IM IDE Android/iPhone Firefox
  32. 32. Twitter
  33. 33. Hudson on Eclipse Update Site: http://code.google.com/p/hudson-eclipse/
  34. 34. Hudson on Android Android Market Hudson Wiki
  35. 35. eXtreme Feedback Panel plugin
  36. 36. Hudson Sound plugin http://wiki.hudson-ci.org/display/HUDSON/Hudson+Sounds+plugin
  37. 37. DEMO
  38. 38. Installation&Upgrade Download Tomcat 6 Download hudson.war Put hudson.war under webapps Start Tomcat
  39. 39. Create a Job
  40. 40. Configure a Job
  41. 41. Configure Hudson
  42. 42. Manage Plugins
  43. 43. Going Distributed Need Isolation Need Different environments One Computer is not enough
  44. 44. Add Slave using JNLP Java Web Start on slave initiates the session Hudson sends JNLP file and jar files A separate socket connection is made
  45. 45. Add Slave using sshd Master talks to sshd on a slave Send slave.jar and “java -jar slave.jar” SSH session becomes bi-di byte stream
  46. 46. Some Distributed Issues Different OS/Environment Install required tools System administration Need to install slave manually Tied Jobs to Slaves
  47. 47. Monitor Slaves Monitor key metrics Low disck space and swap Clock out of sync Put offline automatically
  48. 48. from Koshuke's slide: Continuous Integration in the Cloud with Hudson, JavaOne 2009
  49. 49. from Koshuke's slide: Continuous Integration in the Cloud with Hudson, JavaOne 2009
  50. 50. Labels to Rescue
  51. 51. More on Label Don't tied job to Slave, tied to Label Label is a group of slaves Support boolean expressions since 1.372 windows&&IE FF||Chrome !windows Can be used with Matrix Project
  52. 52. Matrix project Need to run in multiple environments Different JDK Different OS Different Browser Axis could be: Slave User defined Combination Filter !(OS=="linux" && browser=="IE") Touchstone builds Sanity check
  53. 53. Create Matrix Project
  54. 54. Configuration
  55. 55. Results
  56. 56. DEMO
  57. 57. Hudson on Cloud Hudson EC2 plugin CloudBees 8.5 cents/hour of EC2 vs 1 cent/minute of CB
  58. 58. Hudson EC2 plugin AWS Account Information
  59. 59. Hudson EC2 plugin And which AMI you want to start
  60. 60. CloudBees' Hudson as a Service
  61. 61. Miscellaneous Integrate with Repository Browser Monitor an external job Hudson for non-Java Projects
  62. 62. Tracking Changes
  63. 63. Integration with Sventon
  64. 64. Monitor an External Job Hudson Wiki - Monitor an External Job
  65. 65. Hudson for non-Java Projects Python PHP Ruby .Net
  66. 66. Hudson: http://hudson-ci.org/ Mailing List: http://wiki.hudson-ci. org/display/HUDSON/Mailing+List Wiki: http://wiki.hudson-ci.org/display/HUDSON/Home Follow @hudsonci on Twitter "TS-5301 Continuous Integration in the Cloud with Hudson" by Koshuke Hudson Wiki - Distributed builds Label and Matrix Project Enhancements Continous Integration by Martin Fowler Continuous Integration with Hudson - the book Continuous Integration with Hudson on JavaWorld
  67. 67. haocheng.lee@gmail.com follow @haocheng on Twitter

×