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 https://github.com/perlmonkey/yii-sample-project and the other which will set up Jenkins for your Debian or Ubuntu box: https://github.com/perlmonkey/php-ci

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


$ wget https://raw.github.com/perlmonkey/php-ci/master/install.sh

$ sudo /bin/bash install.sh

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 install.sh 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 : http://marcelog.github.io/articles/ci_jenkins_hudson_continuous_integration_php_phing.html

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.