Supermondays: Jenkins CI lightning talk

2,083 views
2,003 views

Published on

A brief introduction to Jenkins Continuous Integration Tool; a 5 minute lightning talk for the SuperMondays community.

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

No Downloads
Views
Total views
2,083
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
41
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Supermondays: Jenkins CI lightning talk

  1. 1. Jenkins Continuous Integration<br />A quick overview of Jenkins CI<br />Michael Peacock@michaelpeacockmichaelpeacock.co.uk<br />
  2. 2. Continuous What?<br />Automated build and test process to verify a software / website / web app build<br />Quality Assurance applied continually during development<br />continuous integration (CI) implements continuous processes of applying quality control — small pieces of effort, applied frequently. Continuous integration aims to improve the quality of software, and to reduce the time taken to deliver it, by replacing the traditional practice of applying quality control after completing all development.*<br />* http://en.wikipedia.org/wiki/Continuous_integration<br />
  3. 3. Jenkins!<br />
  4. 4. Jenkins...<br />Built with Java<br />Provides its own web based interface – doesn’t interfere with your Apache installation<br />Recommendation: install Continuous Integration stuff on a separate server – processing lots of builds could get resource intensive<br />Available for Windows, Mac and Linux<br />
  5. 5. Installation<br />Add the Jenkins repository key to aptitude<br />wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add –<br />Add the repository to your sources file<br />sudo nano /etc/apt/sources.list<br />deb http://pkg.jenkins-ci.org/debian binary/<br />sudo apt-get update<br />Install<br />sudo apt-get install jenkins<br />
  6. 6. Modular<br />
  7. 7. Works with version control systems<br />SVN<br />Git<br />Mercurial<br />CVS<br />
  8. 8. Ant<br />Should be familiar to Java programmers...<br />Makes it really easy to:<br />Move, copy, delete, rename files and folders – use it to move files around after checking out from version control e.g. Swap in a test config file<br />Run commands / programs on the code – such as unit testing, code sniffing and generating documentation<br />Built in to Jenkins out of the box<br />
  9. 9. Testing<br />Automatically run your unit tests<br />Find a plugin<br />Get ant to run your tests by executing commands<br />Build fails if tests fail<br /><target name="phpunit" description="Run unit tests using PHPUnit and generates junit.xml and clover.xml"> <exec executable="phpunit" failonerror="true"/> </target><br /><target name="phpunit" description="Run unit tests using PHPUnit and generates junit.xml and clover.xml"> <exec executable="phpunit" failonerror="true"/> </target><br /><target name="phpunit" description="Run unit tests using PHPUnit and generates results as XML files"> <exec executable="phpunit" failonerror="true"/> </target><br />
  10. 10.
  11. 11. http://www.buildsonmymachine.com/<br />
  12. 12. Weather Report<br />
  13. 13.
  14. 14. You broke the build<br />Stigmatises breaking the build<br />Helps “encourage” / bully developers into better quality work<br />
  15. 15. http://www.youbrokethebuild.com/<br />
  16. 16. Record keeping<br />What changed in the build?<br />
  17. 17. Pipeline<br />Chain Jenkins jobs together, triggering others (e.g. deployment) only when the first job builds successfully, ensures only tested and quality code goes online<br />https://wiki.jenkins-ci.org/display/JENKINS/Build+Pipeline+Plugin<br />(no screenshots, because I couldn’t get it to work  )<br />
  18. 18. Deployment<br />Plug Jenkins into your deployment process<br />Copy files over FTP<br />Copy files over SSH<br />Execute commands on a remote server<br />Tell the web server that the new site has been copied across and is ready for use<br />
  19. 19. Improve<br />Improve the quality of your code<br />Automate your:<br />Testing<br />Quality Assurance process<br />Deployment to development areas<br />Deployment to live environment (through pipeline)<br />Keep clients happier!<br />
  20. 20. Any questions?<br />http://jenkins-ci.org/<br />http://bit.ly/jenkinsciphp<br />Michael Peacock<br />@michaelpeacock<br />www.michaelpeacock.co.uk<br />

×