Set Up Yii With Jenkins Ci

Hello everyone,

I recently had to install Jenkins CI to work with PHP and as it was a little bit more complex than I had hoped I created a full automation to get it up and running (so I never have to it manually again).

Please check it out if you want and let me know what you think. I have two github repos, one for an example Yii project at and the other which will set up Jenkins for your Debian or Ubuntu box:

In order to install it all you need is a Debian or Ubuntu machine. Then log into it and grab the file using wget and execute it like so:

$ wget

$ sudo /bin/bash

Things should work smoothly, but if you find any issues, please let me know. I am also happy to receive any pull requests to improve this as a starting point for developers new to CI with PHP/Yii like me.

Thanks, nice work.

Looks great and simplified, but it appears as if it will try to setup an entire LAMP stack for you.

What if you already have the LAMP stack already installed and (in my case, Jenkins, PHPUnit, and other PHPqa tools as well)?

How would one proceed to integrate Jenkins into the Yii project.

In the file in line 138 you can find a line

ansible_command+=' --tags=common,lamp,php-ci' 

remove the lamp and it should not install a lamp stack.

Thank you. Your tip allowed me to proceed.

I ran into other issues related to installation of the phpqatools and package and executing the $ansible command over ssh.

Not wanting to deal with another dependancy in the form of ansible. I opted for manually proceeding, and make progress.

If anyone is interested, I used the instructions here :

Then, in my Yii application directory, I copied the resources and vendor directories, copied the phing build and tested this until it worked, and created a jenkins job based on the php_template.

However, this is not to take anything away from your contribution @stephanski, and your contribution was a good reference and is appreciated.