To build the system to automate the build and deployment (continuous deployment) process there are few main areas which need to be covered. Following are our prerequisites.
– Source code
– Builds System
– Deployments
– QA Automation
To describe above here are the main ingredients
– Configuration Management
– continuous integration/ Automated Build
– Automated Deployment
–Â Automated testing
Configuration management
Very fist step to align your development practice is to select the right source control tool. Once you have the tool then you need to think of branching policy to make sure the starting point of the workflow is well defined and accepted by developers during their development phase.
There could be lot of process around merging, branching code review etc which needs to be address and policy driven. Some key points could be
– Developments and release branch should be separate.
– Each change goes qualifies for next stage only if reviewed.
– Code quality should not go down.
Following are a few options
 Source control tool
– SVN (Free)
– CVS (Free)
– Git (Free)
-Perforce (Paid)
-Clearcase (Paid)
Build system
Team needs to have robust and automated build system which can take care of all our needs (build, analysis, deployment etc).
– Need to have automated build system which can keep building the source code from various branches to make sure we catch the broken piece fast.
– Build can run the unit test and provide report
– Build can check the health of the code by running findbugs and checkstyle (if any).
Above checks can verify the heath and quality of the code (static analysis).
Nothing should go beyond this point if any of the above is not matching with our criteria.
Till this point we have reached to qualify the minimum criteria for continuous Integration.
Here are few tools which comes under Build system
Build Tools
– Ant
– Maven
– Gradle
– Make
CI tool
– Jenkins
– Cruise control
– Luntbuild
-Bamboo
Repository management
– Nexus
– Artifactory
(Above are not open source but they are free to use with limited features).
Code quality check
– Findbugs
– jacoco
– cobertura
**Deployments **
Deployments are the next big bottleneck for continuous deployment.
We need to have a deployment tool to move ahead,
– configuration management tool like puppet or chef
– Private cloud management (Openstack)
– Third party tool like xl deploy, Udeploy, Opsworks etc..
Deployment strategy can be chosen on the basis of our need and the tool we are using, most of the plugins are available in jenkins (or bamboo) to make tight integration of build and deployment.
(At this stage I am not considering the dynamic provisioning of hardware in this section).
Automated testing
Once deployment phase is over QA regression suite can be triggered via jenkins (or any other tool) and entire reports can be published to central QA metrics board.
This this point we can even use jacoco/cobertura to provide functional code coverage(for Java code) to demonstrate how much % of code QA regression/automation is covering and what is the level of automation.
Similar way job can be setup to raise jira/bug ticket to file issues found during any of the above step.
Finally we can have last step which can perform the final release build and push to staging /production in similar fashion.
 Resource Provisioning
Developers/QA can just get the hardware either from infra team or if auto provisioning is enabled they can setup the environment and use the jenkins to perform build+deployment+QA
If we talk about automatic scaling of environment, we can use AWS for same.
Jenkins has AWS plugin to launch instance, This can be setup to launch instance dynamically and run the application and perform the QA Automation. Once need is over aws instance can be terminated automatically.