Subscribe to PHP Freaks RSS

James Wade: PHP CI with Jenkins and Docker (Part 1)

syndicated from www.phpdeveloper.org on September 11, 2017

On his site James Wade has posted the first part of a tutorial showing you how to get your PHP application set up for continuous integration with Jenkins and Docker. In this part of the series he focuses on the setup of the technology involved, linking to every tool you'll need.

I’ve been developing in PHP now for longer than I haven’t. Going from using PHP as a hammer to a nail, using it to allow forms to send emails, to operating popular open source projects, to leading a team of developers in a business enterprise. One key advice I learned from running an open source project on the SourceForge platform was “release early, release often”.

This is a mantra that I’ve always tried to stick to and its always brought me good results. As I get into more and more complex projects, both in code structure and politically, I find myself turning to tools to solve problems. One of those tools is Continuous Integration.

He talks about coding styles and IDE automation that can help make you code better and cleaner but points out that there's more to be done than just that. He briefly covers the idea behind continuous integration and why he chose Jenkins for his environment. He then gets into the setup process, showing how to get tools like PHPUnit, phploc, phpmd and phpcpd installed. He includes the dockerfile to set up this environment and the bash script that handles the setup process. He finishes the post with a brief look at the automation that happens thanks to the Jenkinsfile configuration and what's coming in part two of the series.