持续集成构建配置
我负责在我的公司设置 CI 服务器,我正在寻找一些关于我的项目需要哪些构建配置的建议。 作为第一步,我将构建设置为:
提交构建:编译代码并运行单元测试
集成构建:编译代码并运行长时间运行的集成测试
我不确定还需要什么来完成 CI 图片。 例如,您的商店有哪些构建配置?
我知道必须有一个步骤来部署我的成功构建,但是我会将部署作为集成的一部分吗?
使用 TeamCity、MSBsuild 和 SVN
寻找急需的建议。
I have been charged with setting up a CI server in my company and I am looking for some advise on what build configs i need for my projects.
As a first step i have set up the builds as:
Commit Build: Compiles code and runs unit tests
Integration Build: Compiles code and runs long running integration tests
I am unsure what else i would need to complete the CI picture. For example What build configs do you have in your shop?
I know there must be a step for deploying my successful builds, but would l make the deployment part of Integration?
Using TeamCity, MSBsuild and SVN
Looking for much needed advice.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
我见过的最完整的构建按照给定的顺序做了以下事情。 有两个组,无论失败,每个组中的所有目标都会执行,但如果组中的成员失败,则该组也会失败。 所以我们看到了所有问题。
第一组处理源代码:
第二组正在处理生成的代码,前提是第一步成功:
这是一次又一次触发提交的主要构建。 它做了很多事情,但对于一些使用多个核心的强大机器来说,500k LOC 大约需要 4 分钟。 如果测试人员愿意,他们可以获得最新的快照版本。
长时间运行的集成测试(每个 2 小时)将每晚运行一次,并且只编译
另一个构建是纯粹的文档构建,每晚触发一次。 它永远不会失败。
The most complete build I ever saw did the following things in the given order. There are two groups, all targets in each group are executed regardless of failure, but the group fails if a member of the group fails. So we see ALL problems.
First group working on sources:
Second group is working on the produced code, only if the first step succeeded:
This is the main build that is triggered time after time for commits. It did a lot, but with some powerfull machine using several cores it was around 4 mins for 500k LOC. Testers can get the newest snapshot builds if they like to.
Long running integration tests (2 hours each) would run once per night and only do
Another build was a purely documantion build, triggered once per night. It would never fail.
我们在之前的项目中在每个 CI 上运行的代码覆盖率记录,
发布自动生成的文档和 Checkstyle 报告。
这为我们提供了一些关于每次签到的统计质量的统计数据,用于计划和改善我们的工作习惯。
Things that we run in a previous project on each CI run where Code Coverage Records,
publish the automated generated documentation and Checkstyle reports.
This gave us some stats about the statistical quality of each checkin for planing and improving our work habits.
我们有编译配置
部署配置允许非技术 QA 资源在准备好测试某些内容时部署到测试环境,并避免错误修复是否已到达测试环境的混乱。
We have build configurations for
The deployment configuration allows a non-technical QA resource to deploy to the test environment whenever they're ready to test something, and avoids the confusion of whether a bug fix has hit the test environment yet.
我们在最近的 CITCON 北美(持续集成和测试会议),我们都分享了我们的经验并尝试整理了从简单 CI 到非常成熟的 CI 和发布系统的路线图。
原始会议记录为 此处。 以及 Flickr 照片流。
清理版本位于Urbancode 博客也是如此。
澳大利亚人在布里斯班 CITCON 上重新讨论了这个话题,并且 pencast 已经发布了
希望其中一些资源很有用。
We had a similar conversation at the most recent CITCON North America (Continuous Integration and Testing conference) where we all shared our experiences and tried to put together a road map from simple CI to very built out CI and release systems.
The original conference notes are here. Along with a Flickr photostream.
A cleaned up version is available at the urbancode blog as well.
The Aussies revisited the topic at CITCON Brisbane and a pencast of that is available
Hope some of those resources are useful.
我目前正在研究这个问题。 我们的构建配置执行以下操作:
构建:
现在我们有了一个可以发布到任何服务器的应用程序,只需将其复制到部署目录,并将相应的配置文件重命名为 web.config
然后我们还有 3 个部署配置。 每次成功构建后,第一个都会部署到开发环境中。 这始终为我们提供了最新代码库的工作版本。 第二个手动部署到暂存。 这设置为从最后固定的开发版本进行部署。 最后有一个实时部署配置,然后从上次部署的暂存版本进行部署。 这会做一些额外的事情:
I am working on this at the moment. Our build configuration does the following:
Build:
Now we have an application that can be published to any server simply by copying it to the deployment directory, and renaming the appropriate config file to web.config
We then have 3 more configurations for deployment. The first gets deployed to a development environment after every successful build. This gives us a working version of the latest codebase at all times. The second gets deployed to staging manually. This is set to deploy from the last pinned development build. Finally there is a live deployment configuration then deploys from the last deployed staging build. This does a number of extra things: