2. Who Am I?
CTO/Founder of Pamiris, Inc.
Extensive NPO board service
Overseen payroll conversions
& HRIS implementations with
over 600 employees
BBA, MIS from EWU 2004
(manga cum laude, BGS)
3. Build Process: wait... why?
But PHP doesn't have to compile!
definition - Build /bild/: The
process of preparing
software for deployment
and/or distribution.
5. PHP Deployment Prep:
Again... why should we?
● Ability to track code quality trends
● More people/other teams can contribute
safely(er. Saflier. Saferly?)
● Accountability for all
● Nervous sleep deprivation, anyone?
● Sooner found = cheaper fixed
8. PHP Deployment Prep:
Why doesn't it happen?
● “Never enough time”
● “It worked fine on my machine”
● “It didn't seem like a big deal”
If it isn't easy and repeatable,
it won't happen.
9. Build Automation:
Make it easy, make it happen
Developers and QA folks alike should be able to
check a commit with absolute ease. The easier it
is, the more it happens. The more it happens,
the better the code is.
10. Build Automation Tools
● GNU Make
http://www.gnu.org/software/make/
● Phing (PHing Is Not Gnu make)
http://www.phing.info/
● Apache Ant
http://ant.apache.org/
11. Start Simple
● Get PHPUnit, behat, PHPspec or other unit
test running
● Get PHPLOC to run (composer makes it easy)
● Install a build automation tool
● MAGIC... ??? … profit.
13. My current build.xml
● ~175 Lines
● Tasks:
– Build (prepare, lint, phpunit-ci, phploc, pdepend,
phpmd)
– Build-parallel
– Phpcs (coding standard analysis)
– Selenium-install
– Selenium-start -stop
14. Ant usage: running the build
● Just 'ant' will autorun the whole build command
● 'ant <target-name>' will run any part of it
● Different targets for different uses
– Developers WIP: fast unit tests w/o coverage or
functional
– Developers pre-commit: all tests plus coverage
– Metric tracking: all static analysis tools
– Pre-deploy: all of the above
15.
16.
17.
18. Next Steps
● Flesh out other valuable build steps
● Store build results
● Automate build on check-in with
Jenkins/TravisCI
● Add charting (trend display)
● Continuous deployment