eddiejaoude / Zend-Framework--Doctrine-ORM--PHPUnit--Ant--Jenkins-CI--TDD-

[DEPRECATED for ZF2 & Composer] Best practice Zend Framework (ZF) skeleton / base with Doctrine2 integration : High code coverage & build scripts using TDD. Issues section ar e used for project planning (features etc)
http://www.jaoudestudios.com
160 stars 40 forks source link

Jenkins CI setup #51

Open eddiejaoude opened 13 years ago

eddiejaoude commented 13 years ago

Now the project is moving quickly & with more developers contributing, I think it is more important to have a central location for build status to be displayed

eddiejaoude commented 13 years ago

I have setup a project on cloud bees, however I am not convinced with the speed of the builds. I have a spare box in the data centre that we could use.

papayasoft commented 13 years ago

Sounds cool. Sadly, I know nothing about Jenkins, or even CI in general, so I'll have to leave all this to you. Is the idea here that we will have a server running someplace where we will be performing/deploying this build?

I see that you are planning on using Ant for build. Like most things, I know nothing about it. Of course, I'm interested.

I have played a little it with Phing and it seems pretty straighforward. The upside, as I understand it, is that Phing is all written in PHP, so if we get to the point where we want to develop custom tasks, we could write them using the more familiar PHP.

Just thinking out loud.

eddiejaoude commented 13 years ago

I havent used Phing before. I wasnt aware it was written in PHP (I will go have a quick read). I have used Ant for a while, really impressed with its power yet simplicity.

The idea of Jenkins (or any CI) is that we only need one instance (server) running and we can all monitor it to make sure that none of the repos are broken. If anything does break, it can be setup to email/message etc all developers, so they are aware not to do a pull and download broken/incomplete code.

I will get it setup and we will have a play. First few builds on cloud bees ran within 5 mins, but the 4th build has been pending for over 30mins, hence why I am inclined to setup our own Jenkins CI server - its more work but more flexibility etc.

I will let you know when it is up and send you your credentials so you can take a look & have a play :)

papayasoft commented 13 years ago

Cool. ;-)

Excited to get back into the ZFD2EJ (my shorthand) project again, but I'm a little bit loaded with #dayjob stuff right now. Hopefully soon!

Cheers,

eddiejaoude commented 13 years ago

No worries, paying work comes first :).

ZFD2EJ...I like that :D

I have now done a fresh install of Ubuntu server on the new build box (build02). Will hopefully install & configure jenkins ci this afternoon.

Will keep you posted Thanks :)

eddiejaoude commented 13 years ago

Jenkins CI is setup on http://build.jaoudestudios.com.

I still need to configure a read only version of jenkins ci for public viewing

eddiejaoude commented 13 years ago

Yeaaah public read only is available of the project :)

eddiejaoude commented 13 years ago

Url of jenkins ci build server is http://build.jaoudestudios.com:8080/ (public read only)

papayasoft commented 13 years ago

Holy smokes, this is cool. ;-)

Despite the successful build - and the auto-tweet, sweet! ;-) - console output is showing some warnings:

http://bit.ly/iBjkPJ

"Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-6-openjdk/lib/tools.jar" Then a sequence of warnings during phpcb.

So, is the idea that this checking out the code, performing the unit-tests, and then building/deploying the app, the docs, and all these reports (code-coverage, code sniffer, etc.)? Where can the public app be viewed? Where can the docs be viewed? Where can the generated reports be viewed?

Well done, man. ;-)

eddiejaoude commented 13 years ago

Glad you like it - this is only the beginning ;).

Yes there are some warnings, I will take a look into that.

You are right, I need to make that information publicly accessible. I will reopen the ticket.

eddiejaoude commented 13 years ago

Latest & greatest demo of project available on http://build.jaoudestudios.com, this is updated by jenkins on each build.

papayasoft commented 13 years ago

Awesome. ;-)

eddiejaoude commented 13 years ago

Build reports (code coverage, pdepend etc) in the link http://build.jaoudestudios.com/build/

Code coverage is probably the most useful on http://build.jaoudestudios.com/build/coverage/

CC @koenHuybrechts

eddiejaoude commented 13 years ago

Do any branches need adding to Jenkinsci?

eddiejaoude commented 13 years ago

Good work...no duplicate lines, nice and DRY :)

phpcpd: [exec] phpcpd 1.3.2 by Sebastian Bergmann. [exec] [exec] 0.00% duplicated lines out of 2359 total lines of code. [exec] [exec] Time: 1 second, Memory: 4.25Mb

papayasoft commented 13 years ago

Wow, that's cool. Congrats. ;-)

Maybe we should exclude from the code coverage reports:

eddiejaoude commented 13 years ago

Good idea, I had a quick go, but it did not work. Tests failed when excluding these directories. There are various ways of creating code coverage reports & I have excluded library directories before, I just need to remember how.

JoelRSimpson commented 13 years ago

I've used the steps outlined here: http://jenkins-php.org/ and the PHP Project Wizard (https://github.com/sebastianbergmann/php-project-wizard) for creation of the necessary build scripts and setup of the script in Jenkins. Make set up trivial for Jenkins with not only PHPUnit, but also phpdocumentor, phpmd (mess detection), and several other tools. Only slightly tricky.