Official Blog‎ > ‎

Continuous Integration(CI) for SME

posted Nov 14, 2011, 7:43 PM by Softhinker Qin   [ updated Nov 22, 2011, 6:09 PM ]
Continuous Integration



Improving productivity of development is one of the most critic issues that SME(Small/Medium Enterprise) is facing. Applying continuous integration methodology contributes to the problem-solving, which definitely is part of your agile development process.

So first of all, What is CI?
In software engineering, continuous integration (CI) implements continuous processes of applying quality control — small pieces of effort, applied frequently. Continuous integration aims to improve the quality of software, and to reduce the time taken to deliver it, by replacing the traditional practice of applying quality control after completing all development.[Source]

Then, of course, it should be followed by some best practices : (Take Java project as an example)
1. Maintain a code repository. 
i.e. Subversion (SVN)
2. Everyone synchronize with repository every day.
It's not required to check in every day, but at least you have to know whether there are some new codes checked in by teammates which may affect your current development.
3. Automate the build.
i.e. Maven, build based on profile.
4. Make the build self-testing.
Test before build is the default behavior using Maven. But, it's compromised usually. i.e. Don't know how to do integration test, or developers would not like to do unit test.
5. Test in a clone of the production environment
Although it's very critical but compromised sometimes, then risk is introduced.
6. Everyone can see the results of the latest build.
Jenkins/Hudson, for both Java and .NET projects.
7. Make it easy to get the latest deliverables.
Artifactory, one of the Maven artifacts management web app. Avoid asking a developer to build on his own local laptop.
8. Automate deployment.
Deployment script is required to hide technical details for testers.

The last but not the least, you need an experienced mentor to drive the whole process until the team is familiar with every corner. You can let Softhinker know for further consultancy.

提高软件开发效率是中小企业面对的关键问题之一,而应用持续集成的方法则可以很大程度上帮助解决这个问题,它也是敏捷开发的一个环节。

那么,什么是持续集成?
在软件工程中,持续集成是一个过程,该过程使用了这样的质量控制方法——即做每一个微小的更改但频繁地集成。持续集成的目标是提高软件质量、缩短软件发布的时间,而传统的方式是做完全部软件开发后才进行质量控制。

当然,持续集成有很多推荐的最佳实践法:
1. 建立并维护一个代码版本管理仓库。
比如:使用SVN
2. 每个软件工程师至少每天把代码跟版本管理仓库同步一次。
不一定提交代码,但至少要了解是否有其他人提交了代码,如果有,更新到本地,看看是否影响到当前的开发。
3. 自动编译。
比如:使用Maven,并且按照profile进行编译
4. 使编译自动测试。
如果使用Maven的话,在编译前测试是缺省的动作,但经常会妥协,比如说,不知道如何做集成测试,或者程序员不愿意写单元测试。
5. 在一个和生产服务器一样的服务器上进行测试。
尽管这很重要,但经常妥协,因为种种的原因而不能完全和生产服务器一模一样,于是引入了风险。
6. 每个人都可以看到最新编译的结果——成功或失败。
比如使用Jenkins/Hundson,可以自动调用Maven来编译并发布结果到页面上。也可以用来编译.net项目。
7. 尽可能容易的获取最新编译好的程序。
使用Artifactory来管理每一个发布的版本或者快照版本。避免让程序员直接从自己的笔记本中直接编译。
8. 自动部署。
自动部署脚本程序很重要,它可以隐藏很多技术细节,方便测试人员快速部署并测试。

最后一点就是,您需要一个有经验的人来驱动并监督整个持续集成的过程直到整个团队熟悉了这样的开发流程。Softhinker 可以为您提供这样的咨询服务。
Comments