A while ago I wrote a blog post on setting up continuous integration for Laravel with Jenkins. That was for Laravel 4, and many things have happened since. In this post I widen the scope and aim for continuous integration (CI) for PHP applications in general. Applications are looking more and more similar to one another in terms of structure and tooling, which allows for a more general approach to them. Jenkins & PHP work perfectly together and Jenkins is a great tool if you want full control of your CI process since everything is open source and it has a huge and active community.

Jenkins is an open source continuous integration server that is a swiss army knife. CI is the process of performing static code analyses and running tests for an application on a regular basis, often on a push to a repository. Jenkins will poll that repository for changes and as soon as anything happens it will pull down the changes and perform all specified tasks. It’s also possible to allow Jenkins to listen to incoming webhooks for triggering updates. The kind of analysis to be performed is up to each application, but generally you look for errors, run tests, run static analysis tools and then have Jenkins generate a nice visual report for looking at the results.

Continue reading

UPDATE: I have published an updated version of this post since this one is a bit outdated. The new post deals with PHP applications in general, and can easily be applied for continuous integration with Laravel & Jenkins. Read it instead.

This will be a hands on guide for setting up automated builds for a Laravel application using Jenkins. Pretty much that when you do a commit, Jenkins will automagically make a build and in that check code errors and syntax, run unit tests and provide visual code coverage for your code base. Achieve continous integration for PHP with Laravel & Jenkins, along with other goodies.

Continue reading