|All reviews||Integrating PHP Projects with Jenkins||Latest reviews||Best sellers ranking|
Integrating PHP Projects with Jenkins
September 29, 2011
Week: Not ranked All time: 401
zero2hero.orgNowadays development projects get bigger and bigger, so they require multiple people to contribute to the source code.
In order to know the current state of the software product automatically and have it verified and analyzed with help of tests and other tools, Continuous Integration was introduced.
Continuous Integration is a development process that is triggered when developers commit their changes frequently and these changes are verified by an automated build process. This helps the team to detect serious problems at an early stage.
So, the Continuous Integration process is just a concept. To make it real, a few tools can be considered. One of them is Jenkins — a sort of control center to create the automated builds in order to verify the quality of the product being created.
The book called "Integrating PHP Projects with Jenkins" is here to help you learn how to setup Jenkins and your first jobs.
Apart from Continuous Integration, there is also a term of "Continuous Inspection" — it's a practice to calculate software metrics that evaluates various aspects of the internal quality of the product for each build — these metrics help to keep an eye on the quality of the software throughout its lifecycle.
Developers can see trends and detect increasing code complexity as early as possible and have a chance to fix them before it becomes too hard.
Jenkins supports Continuous Integration metrics calculation, and you can find guidelines about their setup in this book as well.
In my opinion, there are multiple advantages and few drawbacks in this book.
The advantages are numerous. To begin with, you can find an easy guide how install Jenkins. It covers both types of Jenkins installation — CLI and web-based. There is a list of industry standard plugins with descriptions of what they do, e.g., checkstyle, cloverphp, pmd and others.
A dozen of Continuous Integration\Inspection tools are described with their typical configurations: it's PHPUnit (de-facto standard for the unit testing), PHP_CodeSniffer and PHP_Depend (tools for static analysis of PHP code), phpcpd (PHP Copy/Paste Detector), phpmd (PHP Mess Detector), phploc (Lines of Code software metric), PHP_CodeBrowser (a report generator), coding standard violations detection and result aggregation tools.
Tons of screenshots won't let you drown in the installation guides.
A really great thing for readers is the explanation of how Continuous Integration should work with development branches.
Author also explains how additional testing techniques can help to verify the quality of the product from different perspectives — unit integration and system levels.
Sebastian Bergmann states that to save time setting up multiple Jenkins installations he created a PHP Project Wizard and a Template for Jenkins Jobs for PHP Projects.
The former is a command-line tool that can be used to generate the scripts and configuration files necessary for the build automation of a PHP project, and the latter makes it easy to quickly set up a new job for a PHP project in Jenkins by removing the need to manually configure the post build actions.
And finally, you can find a complete Jenkins build script that takes 3 pages!
There are a few things that could be done better in this book though.
For example, when it comes to Apache Ant build system, the book just quotes the Ant manual reference Web site rather than explaining what a target or exec block are.
Same thing concerns tools like PHP_Depend - only the high spots are hit and terms like "Cyclomatic Complexity" are just mentioned without examples or explanation why it matters.
For example, a screenshot titled "Software Metrics Overview Pyramid generated by PHP_Depend" contains lots of unknown abbreviations and terms.
Continuous Integration is definitely something that all professional developers should be practicing these days to promote greater quality level of their software projects.
If want to learn how to do Continuous Integration right with Jenkins in PHP, this book is definitely one of the best ways to get you started.
All in all, this book is a great help for those who want to learn the Continuous Integration techniques and save time on Jenkins installation.
The book is written by Sebastian Bergmann — the author of PHPUnit, so he is definitely an authority on the subject that knows all you should know.
1. php Book 2011 - Karl (2015-10-06 01:10)