Phing

3,210
-1

Published on

Slides from my Phing talk given at PHPNW June 2011.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
3,210
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
26
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • \n\n
  • \n\n
  • Phing = PHing Is Not Gnu make\n\nDeveloper build toolkit - tool for every job (almost)!\nLGPL Licensed\n\nMy knowledge of Phing about 20%, however there's great documentation!\n
  • Web applications require deployment, packaging, testing, setting permissions, configuration, creating log files\nDoing so by hand every time is scary!\n
  • \n\n
  • \n\n
  • Project: root XML node\nTargets: collection of tasks, together for a reason\nTasks: call to specific action e.g. copy, symlink etc.\n
  • \n\n
  • \n\n
  • Fileset selectors - powerful matching, as well as **\ndate based, size, file/dir, related files present\nMapper - also a good tool, convert filenames during build\nFilters (filterchains) - transform data during build, e.g. strip comments, replace values in config files (via regex)\n
  • \n\n
  • \n\n
  • \n\n
  • \n\n
  • \n\n
  • \n\n
  • \n\n
  • \n\n
  • \n\n
  • \n\n
  • Phing

    1. 1. ContentPhing Build System (basics)What is it / Why use itWhat can it doExample build filesPhing & CI (Jenkins)Questions
    2. 2. Whats this Phing about? The TPhingBuild system- Based on Ant (Apache)- PHP(5) based- No extra dependencies- Cross platform flickr.com/photos/
    3. 3. I dont need nostinking Build SystemDo you write PHP Apps or just web pages?- Configuration- Deployment- Committing- Testing- Documenting
    4. 4. I dont need nostinking Build SystemDo you write PHP Apps or just web pages?- Configuration - Preparation- Deployment - Predictability- Committing - Confidence- Testing - Familiarity- Documenting - Loggable
    5. 5. What can this Phing do?Pretty well everything bar make tea!Anything a shell script can do (FTP, SCP,Chown, Touch, SSH etc.) for deploymentIntegrate with version control (CVS, SVN,Git)Code quality checks (phpcs, pdepend,phpmd etc.)
    6. 6. Oh is that all?
    7. 7. Oh is that all?Unit tests (phpunit, simpletest)Database deployment (dbdeploy)Lint (PHP, JS, XML)Reporting (code coverage, PHPDoc,DocBLox)Not enough? Write your own Tasks or Exec
    8. 8. Hows it work?Phing shell script,launches Phing PHPApp + your XML buildfileBuild file contains:- Properties- Targets- Tasks flickr.com/photos/jm3/4814208649
    9. 9. Hello World!
    10. 10. Example build script
    11. 11. phing clean
    12. 12. prepare
    13. 13. deploy staging
    14. 14. deploy live
    15. 15. Continuous IntegrationRemove reliance onHuman natureRegular automatedbuilds (phing/ant)Report on build status
    16. 16. CI ReportsFor many of the toolsin the Back to BasicsseriesPhing targets:- phpcs, pdepend, phpcpd, phpmd, phpunit, phpcb etc.
    17. 17. Resourceshttp://www.phing.infohttp://www.phing.info/docs/guide/stable/http://jenkins-ci.orghttp://dbdeploy.comhttp://ant.apache.org
    18. 18. Questions?
    19. 19. Contact?Jeremy Coates, MD MagmaDigital Ltdjeremy@phpnw.org.uk@phpcodemonkey#phpnwlinkedin.com/in/jeremycoatesfacebook.com/jeremycoates
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×