Jenkins Continuous Build System
Jenkins Continuous Build System
Jenkins Continuous Build System
Executive summary
!! Continuous integration systems are a vital part of any Agile
team because they help enforce the ideals of Agile development !! Jenkins, a continuous build tool, enables teams to focus on their work by automating the build, artifact management, and deployment processes !! Jenkins core functionality and flexibility allow it to fit in a variety of environments and can help streamline the development process for all stakeholders involved
Agenda
!! Continuous Integration (CI)
!! What is it? !! What are the benefits? !! Continuous Build Systems !! !! !! !! !! !! !!
!! Jenkins
What is it? Where does it fit in? Why should I use it? What can it do? How does it work? Where is it used? How can I get started?
CI - Defined
!! 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. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible Martin Fowler
is:
!! Integrated !! All changes up until that point are combined into the project !! Built !! The code is compiled into an executable or package !! Tested !! Automated test suites are run !! Archived !! Versioned and stored so it can be distributed as is, if desired !! Deployed !! Loaded onto a system where the developers can interact with it
CI - Workflow
Code Repository
Regular Interval
Executable/ Package
Artifact Repository
Developers
CI Benefits
!! Immediate bug detection !! No integration step in the lifecycle !! A deployable system at any given point !! Record of evolution of the project
CI The tools
!! Code Repositories
!! SVN, Mercurial, Git
!! Test Frameworks
!! JUnit,Cucumber, CppUnit
!! Artifact Repositories
!! Nexus, Artifactory, Archiva
Jenkins
!! Branched from Hudson !! Java based Continuous Build System !! Runs in servlet container
!! Glassfish, Tomcat
Jenkins - History
!! 2005 - Hudson was first release by Kohsuke Kawaguchi of
original)
Jenkins Fitting in
Code Repository
Regular Interval
Artifact Repository
Developers
more flexibility !! By combining Jenkins with Ant, Gradle, or other Build Automation tools, the possibilities are limitless
documentation !! Its easy to write plugins !! Think something is wrong with it? You can fix it!
!! Associating with a version control server !! Triggering builds !! Polling, Periodic, Building based on other projects !! Execution of shell scripts, bash scripts, Ant targets, and Maven
targets !! Artifact archival !! Publish JUnit test results and Javadocs !! Email notifications
further
plugins
!! Unit test coverage !! Test result trending !! Findbugs, Checkstyle, PMD
project
!! The status of the last several builds !! Charting (depending on plugins) !! Dependencies
Enhancing Jenkins
!! Jenkins plugin system can enable a wide range of features including (but certainly not
limited to)
!! SCM !! Mercurial, Git, Subversion !! Testing !! Selenium, Windmill, TestLink !! Notifications !! IRC, Twitter, Jabber !! Reporting !! Doxygen, PMD, Findbugs !! Artifact Saving !! Artifactory, Amazon S3, SCP !! Triggers !! Jabber, Directory Watchers !! External Integration !! GitHub, Bugzilla, JIRA !! And most importantly The CI Game !! A points based game where developers compete against each other to develop the most stable, welltested code
container you prefer to use !! Jenkins comes pre-packaged with a servlet if you just want a lightweight implementation !! Native/Supported packages exist for
!! !! !! !! !! !! !! !! !!
Windows Ubuntu/Debian Redhat/Fedora/CentOS Mac OSX openSUSE FreeBSD OpenBSD Solaris/OpenIndiana Gentoo
Jenkins instance
!! Cloudbees - http://www.cloudbees.com/ !! ShiningPanda - https://www.shiningpanda.com/
robust continuous build system !! Jenkins supports Agile principles by constantly providing access to working copies of software !! Jenkins extensibility allows the system to adapt to many different pre-existing environments
the only component !! In order for a CI system to function, a common repository for the codebase needs to exist !! A database of artifacts needs to exist, so deliveries can be made at past iterations !! The last step in a CI process is the deployment of the components built !! and none of this matters if the developers dont use the system; procedures need to ensure the system is used as intended
Conclusion
!! Continuous integration is a necessity on complex projects
due to the benefits it provides regarding early detection of problems !! A good continuous build system should be flexible enough to fit into pre-existing development environments and provide all the features a team expects from such a system !! Jenkins, a continuous build system, can be an integral part of any continuous integration system due to its core feature set and extensibility through a plugin system
References
!! Continuous Integration Martin Fowler
!! http://www.martinfowler.com/articles/continuousIntegration.html
!! Hudson
!! http://hudson-ci.org/
!! Jenkins
!! https://wiki.jenkins-ci.org
!! Monkey Image
!! http://corrines-corner2006.blogspot.com/2011/09/freebie-monday_26.html
+Integration