From Event to Action: Accelerate Your Decision Making with Real-Time Automation
Phing
1.
2. Content
Phing Build System (basics)
What is it / Why use it
What can it do
Example build files
Phing & CI (Jenkins)
Questions
3. What's this Phing
about?
The TPhing
Build system
- Based on Ant
(Apache)
- PHP(5) based
- No extra
dependencies
- Cross platform
flickr.com/photos/
4. I don't need no
stinking 'Build System'
Do you write PHP Apps or just web pages?
- Configuration
- Deployment
- Committing
- Testing
- Documenting
5. I don't need no
stinking 'Build System'
Do you write PHP Apps or just web pages?
- Configuration - Preparation
- Deployment - Predictability
- Committing - Confidence
- Testing - Familiarity
- Documenting - Loggable
6. What can this Phing
do?
Pretty well everything bar make tea!
Anything a shell script can do (FTP, SCP,
Chown, Touch, SSH etc.) for deployment
Integrate with version control (CVS, SVN,
Git)
Code quality checks (phpcs, pdepend,
phpmd etc.)
8. 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
9. How's it work?
Phing shell script,
launches Phing PHP
App + your XML build
file
Build file contains:
- Properties
- Targets
- Tasks flickr.com/photos/jm3/4814208649
22. Contact?
Jeremy Coates, MD Magma
Digital Ltd
jeremy@phpnw.org.uk
@phpcodemonkey
#phpnw
linkedin.com/in/
jeremycoates
facebook.com/jeremycoates
Hinweis der Redaktion
\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