Yii Framework Forum: Set Up Yii With Jenkins Ci - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Set Up Yii With Jenkins Ci Continuous Integration the easy way Rate Topic: ***** 2 Votes

#1 User is offline   stephanski 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 03-January 12

Posted 27 January 2014 - 08:21 AM

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/p...-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.
0

#2 User is offline   Saleem - TheCoder 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 8
  • Joined: 25-February 14
  • Location:Chennai

Posted 25 February 2014 - 06:26 AM

Thanks, nice work.
A clever person solves a problem. A wise person avoids it!
0

#3 User is offline   Crafter 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 16
  • Joined: 10-October 12

Posted 18 June 2014 - 02:04 AM

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.
0

#4 User is offline   stephanski 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 03-January 12

Posted 18 June 2014 - 02:07 AM

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.
0

#5 User is offline   Crafter 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 16
  • Joined: 10-October 12

Posted 21 June 2014 - 12:05 PM

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.gith..._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.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users