Getting Started with Jenkins for PHP Developers - Page 2

Exploring Jenkins Continuous Integration with PHP

With your project defined, it's time to begin exploring Jenkins' capabilities. After the project has been defined you'll be returned to the project's Jenkins home page. This home page includes a menu (see Figure 1) which you can use to perform various tasks, including building the project on-demand (you can automate the build process in various ways; the configuration page offers three such options), performing configuration changes, and notably, viewing build information.

Try building your project by clicking the Build Now link, and after a moment you'll see an entry appear in the project build log which is located directly below the menu. Click the entry link and you'll be presented with some useful information regarding the build's status (see Figure 2).

This interface provides a bevy of useful information about the build, including the latest commit message and a variety of status updates pertaining to the plugins executed as defined by the Template for Jenkins Jobs for PHP Projects' configuration file.

Reviewing Project Statistics

After completing a build a list of useful graphs (known as plots) will also be at your disposal, summarizing the total lines of code found in the project, the number of code structures (classes, methods, functions, etc.), various test targets (classes, methods, etc.), the average length of classes and methods, and much more. Figure 3 presents a screenshot depicting the total lines of code found in a new project.

Documentation Generation

Jenkins will by default generate API and code coverage documentation, in addition to a Web-based code browser. The documentation is placed in respective directories found in your project's build directory. You can determine whether these generation features are enabled and additionally set the default directories from within your project's configuration interface (see Figure 4).

Conclusion

Like PHPUnit, Git and XDebug, Jenkins and the Template for Jenkins Jobs for PHP Projects project offer PHP developers another great solution for effectively and efficiently building complex PHP-driven applications. Are you currently using Jenkins for your PHP applications? Tell us about your experiences in the comments!