Continuously merging developer branches into a common one.
Any code commit may be released to customers at any moment. Works well with Scrum project managements. At the end of sprint code goes into production.
Every successfull build is pushed into production, immediately. Implements Kabnan flow management. Cont. deployment makes releases faster than only with cont. delivery
Exception: Development of a library:
- workaround by triggering new build of application with new version of library
- put that library into production
Branching models:
- Git Flow master branch = state in production devel branch = working state of app
devel branch -> feature branch -> merge feature into develop branch before release: develop branch -> release branch -> close and merge into master and develop -> TAG on master. Hotfix branches: master->hotfix->merge into master
- Workflow with pull requests doesn't have develop branch
git-flow has problems...
major.minor.patch
Build goals:
- prepare the app for use in production
- conf files: should be created during deployment
- third party libraries: composer.phat: extensions, php version, library dependencies
- composer hooks are not good for doing stuff
- Other better build tools: Phing (Ant for PHP). Organize sequences of tasks in form of targets.
Versioning of schema. Up and down.
- Doctrine migrations, Phinx, dbdeploy
- https://phinx.org/
PHPUnit, phpspec, Atoum
Entire use cases / scenarios. We can use external resources (db, etc). We only know input and output -> blackbox test
Very good choice for legacy apps.
Behat
Codeception: tests written in php; based on phpunit
Testing pyramid:
/GUI tests
/ Acceptance tests
/ Unit tests
git+ftp+rsync = russian roulette
Amazon CodeDeploy
- Free on AWS, can be installed on self hosted servers, cheap
- support transitional deployment, rollback, deploy on boot
Zend Deployment
- Included in Zend Server
- Support rollback
- Support transitional deployment
- Hook support