The document discusses continuous delivery (CD) and how it is implemented. CD aims to enable constant changes to production via an automated software production line. Key aspects of the implementation include: extensive unit and functional testing covering at least 70% code coverage; testing in all environments before deployment; automated checks for coding style, syntax and copy/paste detection during development; merging and deploying through automated pipelines triggered by code changes; using tools like Runscope for API testing across environments with assertions; and deploying to environments like integration, staging and production through one-click deployment. The approach has led to deployments three times a day compared to every two weeks previously, and fewer production issues.
4. 4
!
HOW WE DO?
The goal of Continuous Delivery is to enable a constant flow of changes
into production via an automated software production line.
5. 5
Unit test
Functional testing
? Minimum acceptable code coverage : 70%
? Full test in your business logic (Model Layer)
? Preparing one scenario to test all environments
? The strictly line before our code going live
"
Testing Testing Testing
no doubt
6. 6
? unit test
? coding style check
? syntax check
? PHP Mess Detector
? Copy/Paste Detector
#
In development phase
everything is automatic
pull req
update result
trigger branch build
jr. ?³½?³½
Õ¼¾§ŽŸ
7. 7
In review phase
Do the right thing!
merge pull
trigger master build
create a git tag
trigger a package build
? pull the latest git tag
? create a dpkg package
? distribute to the internal APT server
sr. ?³½?³½
8. 8
12
? We use runscope to test v1 and v2 apis
? There are 870 assertions for v2 api testing
? There are 637 assertions for v1 api testing
? Api host is api.int.qbon.com.tw
? The test result will show in HipChat
01 02Deploy to int Trigger API test
? int env is used to do
the functional test
deploy and test in int env
a build a day keeps bugs away
10. 10
%
Automated Testing
Uses Requests, Assertions and Variables
More Advanced assertions can be created by using script
Scheduling tests
Notifications
Runscope Radar