O slideshow foi denunciado.
Seu SlideShare está sendo baixado. ×
Próximos SlideShares
Yale Jenkins Show and Tell
Yale Jenkins Show and Tell
Carregando em…3

Confira estes a seguir

1 de 63 Anúncio

Mais Conteúdo rRelacionado

Diapositivos para si (20)

Semelhante a Jenkins CI (20)


Mais recentes (20)

Jenkins CI

  1. 1. Jenkins 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. 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
  3. 3. Why CI? Rapid Feedback Reduced Risk Collective Ownership Continuous Deployment Offload from people
  4. 4. Best Practices of CI Single Source Repository Commit often Make Your Build Self-Testing Automate the Build Build fast
  5. 5. Jenkins Extensible continuous integration server
  6. 6. What is Jenkins? Open-source CI server Easy to install and use Extensibility Over 330+ plugins (230+ last year) More than 20,000 installations
  7. 7. Why Jenkins? GUI to manage Strong community and eco-system Distributed builds Open Source and Free!
  8. 8. Lots of people are using Jenkins... from Koshuke's slide: Continuous Integration in the Cloud with Hudson, JavaOne 2009
  9. 9. Including Yahoo ;-)
  10. 10. CI Tools survey in 2009 http://www.wakaleo.com/resources/polls
  11. 11. CI Tools survey in 2010 http://www.wakaleo.com/resources/polls
  12. 12. Another CI Tools Survey in 2010
  13. 13. Jenkins is still growing...
  14. 14. And the Job Trend is increasing
  15. 15. Basic Features Notice a change Check out source code Execute builds/tests Record and publish results Notify developers
  16. 16. CI Overview from Continuous integration with Hudson
  17. 17. Notice a change Build Periodically Depend on other projects Poll SCM Subversion Push vs. Pull
  18. 18. Check out source code Subversion CVS Git Mercurial Perforce
  19. 19. Execute builds/tests Java Ant, Maven, Gradle .Net MSBuild, PowerShell Shell Script Python, Ruby, Groovy
  20. 20. Record and publish results JUnit TestNG Findbugs Cobertura Checkstyle PMD
  21. 21. Job Status Job State: Job Stability:
  22. 22. Findbugs Integration
  23. 23. Cobertura Integration
  24. 24. Project Relationship
  25. 25. Notify developers Twitter email RSS IM IDE Android/iPhone Firefox
  26. 26. Twitter
  27. 27. Jenkins on Eclipse Update Site: http://code.google.com/p/hudson-eclipse/
  28. 28. Jenkins on Android Android Market Jenkins Wiki
  29. 29. eXtreme Feedback Panel plugin
  30. 30. Jenkins Sound plugin http://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Sounds+plugin
  31. 31. DEMO
  32. 32. Installation&Upgrade Download Tomcat 6 Download jenkins.war Put jenkins.war under webapps Start Tomcat
  33. 33. Create a Job
  34. 34. Configure a Job
  35. 35. Configure Jenkins
  36. 36. Manage Plugins
  37. 37. Going Distributed Need Isolation Need Different environments One Computer is not enough
  38. 38. Add Slave using JNLP Java Web Start on slave initiates the session Jenkins sends JNLP file and jar files A separate socket connection is made
  39. 39. 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
  40. 40. Some Distributed Issues Different OS/Environment Install required tools System administration Need to install slave manually Tied Jobs to Slaves
  41. 41. Monitor Slaves Monitor key metrics Low disck space and swap Clock out of sync Put offline automatically
  42. 42. from Koshuke's slide: Continuous Integration in the Cloud with Hudson, JavaOne 2009
  43. 43. from Koshuke's slide: Continuous Integration in the Cloud with Hudson, JavaOne 2009
  44. 44. Labels to Rescue
  45. 45. 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
  46. 46. 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
  47. 47. Create Matrix Project
  48. 48. Configuration
  49. 49. Results
  50. 50. DEMO
  51. 51. Jenkins on Cloud Jenkins EC2 plugin CloudBees 8.5 cents/hour of EC2 vs 1 cent/minute of CB
  52. 52. Jenkins EC2 plugin AWS Account Information
  53. 53. Jenkins EC2 plugin And which AMI you want to start
  54. 54. CloudBees' Jenkins as a Service
  55. 55. Miscellaneous Integrate with Repository Browser Monitor an external job Jenkins for non-Java Projects
  56. 56. Tracking Changes
  57. 57. Integration with Sventon
  58. 58. Monitor an External Job Hudson Wiki - Monitor an External Job
  59. 59. Jenkins for non-Java Projects Python PHP Ruby .Net
  60. 60. Jenkins: http://jenkins-ci.org/ Mailing List: http://groups.google.com/group/jenkinsci- users?lnk=srg Wiki: http://wiki.jenkins-ci.org/ Follow @jenkinsci 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
  61. 61. haocheng.lee@gmail.com follow @haocheng on Twitter