2013 10-28 php ug presentation - ci using phing and hudson

31
tech.vocanic.com Continuous Integration with Phing and Hudson If it hurts do it more often. - Wisdom of the Internet All Images have been downloaded from Google Image Search and many thanks to all creators. I am too lazy to attribute each image.

Transcript of 2013 10-28 php ug presentation - ci using phing and hudson

Page 1: 2013 10-28 php ug presentation - ci using phing and hudson

tech.vocanic.com

Continuous Integration with Phing and Hudson

If it hurts do it more often. - Wisdom of the Internet

All Images have been downloaded from Google Image Search and many thanks to all creators. I am too lazy to attribute each image.

Page 2: 2013 10-28 php ug presentation - ci using phing and hudson

tech.vocanic.com

Image Source: http://www.aaroncohen.me/wp-content/uploads/2013/04/2011-04-28.tdd_.png. Thanks to the creator.

Test Driven Development (TDD)

Page 3: 2013 10-28 php ug presentation - ci using phing and hudson

tech.vocanic.com

Our Concerns

•  For our new architecture, we wanted: o  Tests o  Build Scripts o  Packaging (Client of the REST) o  Auto-Deployment

Page 4: 2013 10-28 php ug presentation - ci using phing and hudson

tech.vocanic.com

Java World

• Unit Testing: Junit • Packaging: Jar/War • Building: Ant/Maven • Continuous Integration: Hudson

Image Source: http://www.jbase.com/new/products/images/java.png Thanks to the creator.

Page 5: 2013 10-28 php ug presentation - ci using phing and hudson

tech.vocanic.com

Looked for PHP Solutions

•  Testing: PHPUnit •  Build Scripts: Phing •  Packaging: Phar •  CI: Hudson

Image Source: http://www.jbase.com/new/products/images/java.png Thanks to the creator.

Page 6: 2013 10-28 php ug presentation - ci using phing and hudson

tech.vocanic.com

Phing (PHing Is Not GNU)

•  PHP project build system based on Apache Ant •  Philosophy

o  Simple XML buildfiles o  Rich set of provided tasks o  Easily extendable via PHP classes o  Platform-independent: works on UNIX, Windows, Mac OSX o  No required external dependencies o  Built for PHP5

Image Source: http://www.phing.info/trac/chrome/site/logo.gif Thanks to the creator.

Page 7: 2013 10-28 php ug presentation - ci using phing and hudson

tech.vocanic.com

Phing (PHing Is Not GNU)

•  Features o  PHPUnit and SimpleTest unit tests (including test result and coverage

reports) o  file system operations o  SQL execution, o  CVS/SVN/GIT operations, o  tools for creating PEAR packages, o  documentation generation (DocBlox, PhpDocumentor) and o  much, much more.

Image Source: http://www.phing.info/trac/chrome/site/logo.gif Thanks to the creator.

Page 8: 2013 10-28 php ug presentation - ci using phing and hudson

tech.vocanic.com

Code Snippet – build.xml

Page 9: 2013 10-28 php ug presentation - ci using phing and hudson

tech.vocanic.com

Lint and Prep

Page 10: 2013 10-28 php ug presentation - ci using phing and hudson

tech.vocanic.com

Test

Page 11: 2013 10-28 php ug presentation - ci using phing and hudson

tech.vocanic.com

Deploy

Page 12: 2013 10-28 php ug presentation - ci using phing and hudson

tech.vocanic.com

Phar

Page 13: 2013 10-28 php ug presentation - ci using phing and hudson

tech.vocanic.com

Starting a Development Server

Page 14: 2013 10-28 php ug presentation - ci using phing and hudson

tech.vocanic.com

Composing from Phing Files

Page 15: 2013 10-28 php ug presentation - ci using phing and hudson

tech.vocanic.com

Code Coverage & Test Results

Page 16: 2013 10-28 php ug presentation - ci using phing and hudson

tech.vocanic.com

Generating PHP Docs

Page 17: 2013 10-28 php ug presentation - ci using phing and hudson

tech.vocanic.com

Reports (Test Results)

Page 18: 2013 10-28 php ug presentation - ci using phing and hudson

tech.vocanic.com

Reports (PHP Docs)

Page 19: 2013 10-28 php ug presentation - ci using phing and hudson

tech.vocanic.com

Reports (Code Coverage)

Page 20: 2013 10-28 php ug presentation - ci using phing and hudson

tech.vocanic.com

Lots more on offer

Page 21: 2013 10-28 php ug presentation - ci using phing and hudson

tech.vocanic.com

Hudson

•  Continuous Integration •  Philosophy

o  Building/testing software projects continuously o  Monitoring executions of externally-run jobs

Image Source: http://wiki.eclipse.org/images/1/18/Hudson-bust.png Thanks to the creator.

Page 22: 2013 10-28 php ug presentation - ci using phing and hudson

tech.vocanic.com

Hudson

•  Features o  Easy Installations o  Easy Configuration o  E-mail Integration o  Test Reporting o  Publishing Docs (PHP Docs, Code Coverage etc) o  Plugin Support

Image Source: http://wiki.eclipse.org/images/1/18/Hudson-bust.png Thanks to the creator.

Page 23: 2013 10-28 php ug presentation - ci using phing and hudson

tech.vocanic.com

Security - Hudson + LDAP

Page 24: 2013 10-28 php ug presentation - ci using phing and hudson

tech.vocanic.com

Add Plugins

Page 25: 2013 10-28 php ug presentation - ci using phing and hudson

tech.vocanic.com

Set Up a Job - Basics

Page 26: 2013 10-28 php ug presentation - ci using phing and hudson

tech.vocanic.com

Set Up a Job - Source Code

Page 27: 2013 10-28 php ug presentation - ci using phing and hudson

tech.vocanic.com

Set Up a Job – Triggers

Page 28: 2013 10-28 php ug presentation - ci using phing and hudson

tech.vocanic.com

Set Up a Job – Post Run

Page 29: 2013 10-28 php ug presentation - ci using phing and hudson

tech.vocanic.com

Job Dashboard

Page 30: 2013 10-28 php ug presentation - ci using phing and hudson

tech.vocanic.com

Console Output

Page 31: 2013 10-28 php ug presentation - ci using phing and hudson

tech.vocanic.com