你如何使用构建服务器启动和运行?

时间:2022-05-18 20:54:20

I think everyone here would agree that in order to be considered a professional software house there are number fundamental things you must have in place.

我想这里的每个人都会同意,为了被认为是一个专业的软件公司,你必须拥有许多基本的东西。

There is no doubt that one of these things is a build server, the question is, how far do you need to go.

毫无疑问,这些东西中的一个是构建服务器,问题是,你需要走多远。

  • What are the minimum requirements for the build server? (Somewhere to just compile?)
  • 构建服务器的最低要求是什么? (在某处编译?)

  • What is the ultimate goal for your build server? (Scheduled, source control integration, auto deployment to test / live servers)
  • 构建服务器的最终目标是什么? (预定的源代码控制集成,自动部署到测试/实时服务器)

  • Where is a good place to start assuming you have nothing at the moment?
  • 假设你现在什么也没有,开始的好地方在哪里?

It would be great if we could list out a few simple tasks that an amateur developer could take on board in order to set them on the right track to a fully functional build server.

如果我们能列出一些业余开发人员可以采取的简单任务,以便将它们设置在一个功能齐全的构建服务器的正确轨道上,那将是很棒的。

It would also be good to hear about people that feel they have a "complete" system setup that performs all the functionality they require and how they went about setting it all up from scratch.

听到人们认为他们有一个“完整”的系统设置,可以执行他们需要的所有功能以及如何从头开始设置所有功能,这也是一件好事。

12 个解决方案

#1


You can start by looking into Cruise Control.

您可以从查看Cruise Control开始。

There's also CruiseControl.net if that's your poison.

如果这是你的毒药,还有CruiseControl.net。

Essentially though, you need the following ingredients:

基本上,您需要以下成分:

  • A dedicated environment (Virtual Machine/server. Don't use a developer's machine, unless it's just you. Even then, run a VM if you can. Much easier to move it to a server when/if one becomes available in your organisation)
  • 一个专用环境(虚拟机/服务器。不要使用开发人员的机器,除非它只是你。即便如此,如果可以的话,运行一个VM。如果你的组织中有一个可用的话,将它移动到服务器会更容易)

  • A source control system that supports labelled/tagged revisions (for example, Subversion+TortoiseSVN)
  • 支持标记/标记修订的源代码控制系统(例如,Subversion + TortoiseSVN)

  • Build scripts. These can be batchfiles that start the devenv.exe or msbuild.exe applications with a command line, or you can use something like Ant or NAnt.
  • 构建脚本。这些可以是使用命令行启动devenv.exe或msbuild.exe应用程序的批处理文件,也可以使用Ant或NAnt之类的东西。

In this scenario, CruiseControl acts as the Continous Integration server, and can make sure that you have builds done as you check in your code. This means you know whether the build is broken quicker than if you just had nightly builds. You should probably also have nightly builds, though.

在这种情况下,CruiseControl充当Continous Integration服务器,并且可以确保在检入代码时完成构建。这意味着你知道构建是否比你刚刚进行夜间构建更快。不过,你应该也应该有夜间构建。

#2


Hudson is a great CI.

哈德森是一个伟大的CI。

We run farm locally, but we started by downloading hudson.war and doing

我们在本地运行农场,但是我们从下载hudson.war开始做了

java -jar hudson.war

java -jar hudson.war

It integrates with SCM, bug trucking systems it is really awesome.

它与SCM,bug运输系统集成,真的很棒。

You'll need some disk space if you want to keep old build.

如果要保留旧版本,则需要一些磁盘空间。

Enjoy it is most straightforward CI solution so far.

享受它是目前为止最简单的CI解决方案。

HTH, Hubert.

#3


If you're using Cruise Control, the place to start is an Ant build.xml that does the job manually.

如果您正在使用Cruise Control,那么启动的地方是一个Ant build.xml,它可以手动完成工作。

You need a version control system that can do labeled check-outs.

您需要一个可以进行标记检出的版本控制系统。

You need JUnit tests to run using the Ant task and generate HTML reports.

您需要使用Ant任务运行JUnit测试并生成HTML报告。

#4


Id say you'd have to start by implementing a build strategy so you can build your code in a structured way - I use NANT.

我想你必须从实施构建策略开始,这样你才能以结构化的方式构建代码 - 我使用NANT。

For a basic build server - use one of the CI offerings out there that monitors your source control and triggers a build whenever a change is detected. eg: cruiseControl.

对于基本构建服务器 - 使用其中一个CI产品来监视源控件,并在检测到更改时触发构建。例如:cruiseControl。

Once you get the basic build together - add the running of your unit tests after a successfuly build.

一旦获得基本构建 - 在成功构建之后添加单元测试的运行。

The most successful system i've had in place had 3 different builds :- - one that fired on a check in - all this did was build the code. - an on demand one that would build the application, generate the installer and then put the installer into a shared drive for the testers to pick up - a daily build that fired at 10pm. This: - ran some code generation to build DB and C# code from a UML model - build the code - created a new build verification test user on a test oracle instance - ran the application schema into the db - fired off a bunch of unit tests - cleaned up the db user (if the tests were successful) - ran coverage analysis to build a report of the unit code coverage

我所拥有的最成功的系统有3种不同的构建: - 一种在签入时解雇的 - 所有这些都构建了代码。 - 按需构建应用程序,生成安装程序,然后将安装程序放入共享驱动器以供测试人员接收 - 每日构建在晚上10点解雇。这个: - 运行一些代码生成来构建来自UML模型的DB和C#代码 - 构建代码 - 在测试oracle实例上创建一个新的构建验证测试用户 - 将应用程序模式运行到db - 启动了一堆单元测试 - 清理db用户(如果测试成功) - 运行覆盖率分析以构建单元代码覆盖率的报告

Software we used for this was NANT, CruiseControl.NET, a custom code generation system, custom app to build an oracle schema, and NCover for the code analysis.

我们用于此的软件是NANT,CruiseControl.NET,自定义代码生成系统,用于构建oracle架构的自定义应用程序,以及用于代码分析的NCover。

#5


Start by having a read of Martin Fowler's excellent paper on Continuous Integration.

首先阅读Martin Fowler关于持续集成的优秀论文。

We built such a system for a major project >2,000 kSLOC and it proved itself to be invaluable.

我们为一个> 2,000 kSLOC的重大项目建立了这样一个系统,它证明了它是非常宝贵的。

HTH

cheers,

Rob

#6


Cruise, Maven, Hudson etc are all great but its always worth having a stopgap solution.

Cruise,Maven,Hudson等都很棒,但它总是值得一个权宜之计。

You should have a batch file, shell script or simply written instructions that will allow you to run a build from any machine. We have had build servers unavailable in the past and the ability to switch quickly to another machine was invaluable!

您应该有一个批处理文件,shell脚本或简单的书面说明,允许您从任何计算机运行构建。我们过去没有构建服务器,并且能够快速切换到另一台机器是非常宝贵的!

The spec of the build machine need not be important unless you have a monster project. We try and keep our build times down to 10 minutes (including unit tests) and we have a pretty big project.

除非你有一个怪物项目,否则构建机器的规格并不重要。我们尝试将构建时间缩短到10分钟(包括单元测试),我们有一个非常大的项目。

Don't be tempted to create or write your own build system because "none of the tools out there are good enough". All modern build systems allow you to write plugins to do custom stuff.

不要试图创建或编写自己的构建系统,因为“没有任何工具足够好”。所有现代构建系统都允许您编写插件来执行自定义操作。

#7


I'm using Cruisecontrol.NET and an msbuild buildscript.

我正在使用Cruisecontrol.NET和一个msbuild buildscript。

I can use the buildscript manually so that I can get the latest version of the codebase, built the codebase very easily using the commandline. (This is very interesting if you are working on an application that consists of multiple solutions).

我可以手动使用buildscript,这样我就可以获得最新版本的代码库,使用命令行可以非常轻松地构建代码库。 (如果您正在处理由多个解决方案组成的应用程序,这非常有趣)。

Next to that, my CruiseControl.NET buildserver uses this buildscript as well. It checks on a regular interval if there have been changes committed to the source-control.
If that happens, CC.NET performs the 'get-latest' task that I've defined in the buildscript, builds everything, executes unit-tests and performs a statical code analysis (fxcop).

接下来,我的CruiseControl.NET构建服务器也使用此构建脚本。如果已对源控件进行了更改,它会定期检查。如果发生这种情况,CC.NET将执行我在buildscript中定义的“get-latest”任务,构建所有内容,执行单元测试并执行静态代码分析(fxcop)。

My 'buildserver' is just an old workstation. It's a PIV, 3Ghz with 1gb RAM, and it does its job perfectly.

我的'buildserver'只是一个旧工作站。它是一个PIV,3Ghz,1GB RAM,它完美地完成了它的工作。

One additional thing that I would find interesting, is to have the ability to automatically deploy a new version, or build a setup. I haven't done that yet, since I'm not sure whether it is a good idea, nor have I found a good strategy yet to do so ... I mean; is deploying a new version of some components into production for a mission-critical application a good idea ? I don't think so ...

我觉得有趣的另一件事是能够自动部署新版本或构建设置。我还没有这样做,因为我不确定这是不是一个好主意,也没有找到一个好的策略呢?我的意思是;是否正在为一个关键任务应用程序部署新版本的某些组件,这是一个好主意?我不这么认为......

I think this is a good place to start: [http://confluence.public.thoughtworks.org/display/CC/Home;jsessionid=5201DA7E8D361EB164C40E519DA0F0DE][1]

我认为这是一个很好的起点:[http://confluence.public.thoughtworks.org/display/CC/Home;jsessionid=5201DA7E8D361EB164C40E519DA0F0DE] [1]

At least, that's where I started looking when setting up my build server. :)

至少,这是我在设置构建服务器时开始寻找的地方。 :)

[1]: Home of CruiseControl

[1]:CruiseControl的主页

#8


Roughly in order - minimal/least sophisticated through more sophisticated

大致有序 - 通过更复杂的最小/最不复杂

  • able to get a specific set of source onto any machine
  • 能够在任何机器上获得一组特定的源

  • able to build that source (with no problems)
  • 能够构建该源(没有问题)

  • able to (schedule) build each night/or some other defined period with no user intervention
  • 能够(安排)构建每个晚上/或其他一些定义的时间段而无需用户干预

  • One (or more) dedicated build server (not shared as qa or dev machine)
  • 一个(或多个)专用构建服务器(不作为qa或dev机器共享)

  • able to do a build after each check-in/commit
  • 能够在每次签入/提交后进行构建

  • Notify interested parties of the build status after a build
  • 在构建之后通知感兴趣的各方构建状态

  • Provide build status at any time
  • 随时提供构建状态

  • Create installers as part of the build
  • 创建安装程序作为构建的一部分

  • ability to deploy/live if build is good
  • 如果构建良好,则可以部署/生存

  • Run unit tests
  • 运行单元测试

  • Run tests on the product
  • 对产品进行测试

  • Report the results of those tests
  • 报告这些测试的结果

  • Static code analysis and reporting ... And the list goes on and on
  • 静态代码分析和报告......并且列表一直在继续

Don't be afraid to just start with batch files or shell scripts or other ad-hoc means. People made perfectly good software before the CI craze. there were plenty of good processes before Hudson and Cruise Control - ( I am not knocking those or others - I use Hudson among others) - but don't miss the point - these things are here to help you - not become overbearing process)

不要害怕只是从批处理文件或shell脚本或其他特殊方法开始。在CI热潮之前,人们制作了非常好的软件。在哈德森和克鲁斯控制之前有很多好的过程 - (我不是在敲击那些或其他人 - 我在其他人中使用哈德森) - 但是不要错过这一点 - 这些东西在这里帮助你 - 不要成为霸道的过程)

#9


I couldn't give you all the details about how we set our build server up (I was only involved at the start), but:

我无法向您提供有关我们如何设置构建服务器的所有详细信息(我只是在开始时参与),但是:

  1. We started with an in-house system, implemented in ASP.NET and a .NET Windows Service, using NAnt to do the actual builds. Actually, most of the workflow was implemented in NAnt (e.g. emailing people, copying stuff around, etc.).
  2. 我们从一个内部系统开始,在ASP.NET和.NET Windows服务中实现,使用NAnt进行实际构建。实际上,大多数工作流程都是在NAnt中实现的(例如通过电子邮件发送给人们,复制内容等)。

  3. We moved to JetBrains TeamCity (there's a free cut-down version available), which is still serving us well.
  4. 我们搬到了JetBrains TeamCity(有一个免费的缩减版本),它仍然很好地为我们服务。

We use it for builds triggered by a commit: these just build the binaries and run the unit tests. From here, we can do a complete build, which does the MSI as well. From there, we have system test builds that run more in-depth tests, across an environment built with virtual machines (with a separate domain controller, SQL Server box, etc.). When the system tests pass, the build is made available to our QA department for manual testing and some regression tests that we've not automated yet.

我们将它用于由提交触发的构建:这些只是构建二进制文件并运行单元测试。从这里开始,我们可以进行完整的构建,也可以进行MSI。从那里开始,我们有一个系统测试版本,可以在使用虚拟机(使用单独的域控制器,SQL Server框等)构建的环境中运行更深入的测试。当系统测试通过时,构建可供我们的QA部门进行手动测试和一些我们尚未自动化的回归测试。

#10


In the java space I've tested most of the available build environments. The issue with automatic build is that you quite often end up spending a fair amount of time following it up. After we switched to the commercial bamboo from atlassian, we found that we have to spend a lot less time pampering the build box, which in our case turns out to be very good economy. Bamboo also supports clustering, so you can add inexpensive boxes as needs evolves.

在java空间中,我测试了大多数可用的构建环境。自动构建的问题在于,您经常会花费相当多的时间来跟进它。在我们从atlassian切换到商业竹子之后,我们发现我们必须花费更少的时间来呵护构建盒子,在我们的情况下,这是非常好的经济。 Bamboo还支持群集,因此您可以根据需求增加廉价的盒子。

#11


Try & find something that fits in with your existing practices in terms of building - e.g. it's not going to be a good fit to try & use an Ant-based buildserver if you're using Maven, for instance!

在建筑方面尝试找到适合您现有做法的内容 - 例如例如,如果您正在使用Maven,那么尝试使用基于Ant的构建服务器并不合适!

Ideally, it should just be able to monitor your source-control system, checkout the code, build, run some tests & publish the results without you being aware of it, or at least not 'till it's reporting a failure. Personally, I'd suggest Hudson (https://hudson.dev.java.net/) as a good starting point as it's easy to get installed & running & has a decent UI.

理想情况下,它应该能够监控您的源代码控制系统,检查代码,构建,运行一些测试并发布结果,而不会发现它,或者至少不会“直到它报告失败”。就个人而言,我建议Hudson(https://hudson.dev.java.net/)作为一个很好的起点,因为它很容易安装和运行并具有不错的用户界面。

#12


We start by writing batch scripts that will run on the developers machine. Once we have all the processes automated, we move them to the build server.

我们首先编写将在开发人员机器上运行的批处理脚本。一旦我们将所有流程自动化,我们就将它们移动到构建服务器。

On the tools side we are currently moving from Cruise Control to TFS.

在工具方面,我们目前正在从Cruise Control转向TFS。

#1


You can start by looking into Cruise Control.

您可以从查看Cruise Control开始。

There's also CruiseControl.net if that's your poison.

如果这是你的毒药,还有CruiseControl.net。

Essentially though, you need the following ingredients:

基本上,您需要以下成分:

  • A dedicated environment (Virtual Machine/server. Don't use a developer's machine, unless it's just you. Even then, run a VM if you can. Much easier to move it to a server when/if one becomes available in your organisation)
  • 一个专用环境(虚拟机/服务器。不要使用开发人员的机器,除非它只是你。即便如此,如果可以的话,运行一个VM。如果你的组织中有一个可用的话,将它移动到服务器会更容易)

  • A source control system that supports labelled/tagged revisions (for example, Subversion+TortoiseSVN)
  • 支持标记/标记修订的源代码控制系统(例如,Subversion + TortoiseSVN)

  • Build scripts. These can be batchfiles that start the devenv.exe or msbuild.exe applications with a command line, or you can use something like Ant or NAnt.
  • 构建脚本。这些可以是使用命令行启动devenv.exe或msbuild.exe应用程序的批处理文件,也可以使用Ant或NAnt之类的东西。

In this scenario, CruiseControl acts as the Continous Integration server, and can make sure that you have builds done as you check in your code. This means you know whether the build is broken quicker than if you just had nightly builds. You should probably also have nightly builds, though.

在这种情况下,CruiseControl充当Continous Integration服务器,并且可以确保在检入代码时完成构建。这意味着你知道构建是否比你刚刚进行夜间构建更快。不过,你应该也应该有夜间构建。

#2


Hudson is a great CI.

哈德森是一个伟大的CI。

We run farm locally, but we started by downloading hudson.war and doing

我们在本地运行农场,但是我们从下载hudson.war开始做了

java -jar hudson.war

java -jar hudson.war

It integrates with SCM, bug trucking systems it is really awesome.

它与SCM,bug运输系统集成,真的很棒。

You'll need some disk space if you want to keep old build.

如果要保留旧版本,则需要一些磁盘空间。

Enjoy it is most straightforward CI solution so far.

享受它是目前为止最简单的CI解决方案。

HTH, Hubert.

#3


If you're using Cruise Control, the place to start is an Ant build.xml that does the job manually.

如果您正在使用Cruise Control,那么启动的地方是一个Ant build.xml,它可以手动完成工作。

You need a version control system that can do labeled check-outs.

您需要一个可以进行标记检出的版本控制系统。

You need JUnit tests to run using the Ant task and generate HTML reports.

您需要使用Ant任务运行JUnit测试并生成HTML报告。

#4


Id say you'd have to start by implementing a build strategy so you can build your code in a structured way - I use NANT.

我想你必须从实施构建策略开始,这样你才能以结构化的方式构建代码 - 我使用NANT。

For a basic build server - use one of the CI offerings out there that monitors your source control and triggers a build whenever a change is detected. eg: cruiseControl.

对于基本构建服务器 - 使用其中一个CI产品来监视源控件,并在检测到更改时触发构建。例如:cruiseControl。

Once you get the basic build together - add the running of your unit tests after a successfuly build.

一旦获得基本构建 - 在成功构建之后添加单元测试的运行。

The most successful system i've had in place had 3 different builds :- - one that fired on a check in - all this did was build the code. - an on demand one that would build the application, generate the installer and then put the installer into a shared drive for the testers to pick up - a daily build that fired at 10pm. This: - ran some code generation to build DB and C# code from a UML model - build the code - created a new build verification test user on a test oracle instance - ran the application schema into the db - fired off a bunch of unit tests - cleaned up the db user (if the tests were successful) - ran coverage analysis to build a report of the unit code coverage

我所拥有的最成功的系统有3种不同的构建: - 一种在签入时解雇的 - 所有这些都构建了代码。 - 按需构建应用程序,生成安装程序,然后将安装程序放入共享驱动器以供测试人员接收 - 每日构建在晚上10点解雇。这个: - 运行一些代码生成来构建来自UML模型的DB和C#代码 - 构建代码 - 在测试oracle实例上创建一个新的构建验证测试用户 - 将应用程序模式运行到db - 启动了一堆单元测试 - 清理db用户(如果测试成功) - 运行覆盖率分析以构建单元代码覆盖率的报告

Software we used for this was NANT, CruiseControl.NET, a custom code generation system, custom app to build an oracle schema, and NCover for the code analysis.

我们用于此的软件是NANT,CruiseControl.NET,自定义代码生成系统,用于构建oracle架构的自定义应用程序,以及用于代码分析的NCover。

#5


Start by having a read of Martin Fowler's excellent paper on Continuous Integration.

首先阅读Martin Fowler关于持续集成的优秀论文。

We built such a system for a major project >2,000 kSLOC and it proved itself to be invaluable.

我们为一个> 2,000 kSLOC的重大项目建立了这样一个系统,它证明了它是非常宝贵的。

HTH

cheers,

Rob

#6


Cruise, Maven, Hudson etc are all great but its always worth having a stopgap solution.

Cruise,Maven,Hudson等都很棒,但它总是值得一个权宜之计。

You should have a batch file, shell script or simply written instructions that will allow you to run a build from any machine. We have had build servers unavailable in the past and the ability to switch quickly to another machine was invaluable!

您应该有一个批处理文件,shell脚本或简单的书面说明,允许您从任何计算机运行构建。我们过去没有构建服务器,并且能够快速切换到另一台机器是非常宝贵的!

The spec of the build machine need not be important unless you have a monster project. We try and keep our build times down to 10 minutes (including unit tests) and we have a pretty big project.

除非你有一个怪物项目,否则构建机器的规格并不重要。我们尝试将构建时间缩短到10分钟(包括单元测试),我们有一个非常大的项目。

Don't be tempted to create or write your own build system because "none of the tools out there are good enough". All modern build systems allow you to write plugins to do custom stuff.

不要试图创建或编写自己的构建系统,因为“没有任何工具足够好”。所有现代构建系统都允许您编写插件来执行自定义操作。

#7


I'm using Cruisecontrol.NET and an msbuild buildscript.

我正在使用Cruisecontrol.NET和一个msbuild buildscript。

I can use the buildscript manually so that I can get the latest version of the codebase, built the codebase very easily using the commandline. (This is very interesting if you are working on an application that consists of multiple solutions).

我可以手动使用buildscript,这样我就可以获得最新版本的代码库,使用命令行可以非常轻松地构建代码库。 (如果您正在处理由多个解决方案组成的应用程序,这非常有趣)。

Next to that, my CruiseControl.NET buildserver uses this buildscript as well. It checks on a regular interval if there have been changes committed to the source-control.
If that happens, CC.NET performs the 'get-latest' task that I've defined in the buildscript, builds everything, executes unit-tests and performs a statical code analysis (fxcop).

接下来,我的CruiseControl.NET构建服务器也使用此构建脚本。如果已对源控件进行了更改,它会定期检查。如果发生这种情况,CC.NET将执行我在buildscript中定义的“get-latest”任务,构建所有内容,执行单元测试并执行静态代码分析(fxcop)。

My 'buildserver' is just an old workstation. It's a PIV, 3Ghz with 1gb RAM, and it does its job perfectly.

我的'buildserver'只是一个旧工作站。它是一个PIV,3Ghz,1GB RAM,它完美地完成了它的工作。

One additional thing that I would find interesting, is to have the ability to automatically deploy a new version, or build a setup. I haven't done that yet, since I'm not sure whether it is a good idea, nor have I found a good strategy yet to do so ... I mean; is deploying a new version of some components into production for a mission-critical application a good idea ? I don't think so ...

我觉得有趣的另一件事是能够自动部署新版本或构建设置。我还没有这样做,因为我不确定这是不是一个好主意,也没有找到一个好的策略呢?我的意思是;是否正在为一个关键任务应用程序部署新版本的某些组件,这是一个好主意?我不这么认为......

I think this is a good place to start: [http://confluence.public.thoughtworks.org/display/CC/Home;jsessionid=5201DA7E8D361EB164C40E519DA0F0DE][1]

我认为这是一个很好的起点:[http://confluence.public.thoughtworks.org/display/CC/Home;jsessionid=5201DA7E8D361EB164C40E519DA0F0DE] [1]

At least, that's where I started looking when setting up my build server. :)

至少,这是我在设置构建服务器时开始寻找的地方。 :)

[1]: Home of CruiseControl

[1]:CruiseControl的主页

#8


Roughly in order - minimal/least sophisticated through more sophisticated

大致有序 - 通过更复杂的最小/最不复杂

  • able to get a specific set of source onto any machine
  • 能够在任何机器上获得一组特定的源

  • able to build that source (with no problems)
  • 能够构建该源(没有问题)

  • able to (schedule) build each night/or some other defined period with no user intervention
  • 能够(安排)构建每个晚上/或其他一些定义的时间段而无需用户干预

  • One (or more) dedicated build server (not shared as qa or dev machine)
  • 一个(或多个)专用构建服务器(不作为qa或dev机器共享)

  • able to do a build after each check-in/commit
  • 能够在每次签入/提交后进行构建

  • Notify interested parties of the build status after a build
  • 在构建之后通知感兴趣的各方构建状态

  • Provide build status at any time
  • 随时提供构建状态

  • Create installers as part of the build
  • 创建安装程序作为构建的一部分

  • ability to deploy/live if build is good
  • 如果构建良好,则可以部署/生存

  • Run unit tests
  • 运行单元测试

  • Run tests on the product
  • 对产品进行测试

  • Report the results of those tests
  • 报告这些测试的结果

  • Static code analysis and reporting ... And the list goes on and on
  • 静态代码分析和报告......并且列表一直在继续

Don't be afraid to just start with batch files or shell scripts or other ad-hoc means. People made perfectly good software before the CI craze. there were plenty of good processes before Hudson and Cruise Control - ( I am not knocking those or others - I use Hudson among others) - but don't miss the point - these things are here to help you - not become overbearing process)

不要害怕只是从批处理文件或shell脚本或其他特殊方法开始。在CI热潮之前,人们制作了非常好的软件。在哈德森和克鲁斯控制之前有很多好的过程 - (我不是在敲击那些或其他人 - 我在其他人中使用哈德森) - 但是不要错过这一点 - 这些东西在这里帮助你 - 不要成为霸道的过程)

#9


I couldn't give you all the details about how we set our build server up (I was only involved at the start), but:

我无法向您提供有关我们如何设置构建服务器的所有详细信息(我只是在开始时参与),但是:

  1. We started with an in-house system, implemented in ASP.NET and a .NET Windows Service, using NAnt to do the actual builds. Actually, most of the workflow was implemented in NAnt (e.g. emailing people, copying stuff around, etc.).
  2. 我们从一个内部系统开始,在ASP.NET和.NET Windows服务中实现,使用NAnt进行实际构建。实际上,大多数工作流程都是在NAnt中实现的(例如通过电子邮件发送给人们,复制内容等)。

  3. We moved to JetBrains TeamCity (there's a free cut-down version available), which is still serving us well.
  4. 我们搬到了JetBrains TeamCity(有一个免费的缩减版本),它仍然很好地为我们服务。

We use it for builds triggered by a commit: these just build the binaries and run the unit tests. From here, we can do a complete build, which does the MSI as well. From there, we have system test builds that run more in-depth tests, across an environment built with virtual machines (with a separate domain controller, SQL Server box, etc.). When the system tests pass, the build is made available to our QA department for manual testing and some regression tests that we've not automated yet.

我们将它用于由提交触发的构建:这些只是构建二进制文件并运行单元测试。从这里开始,我们可以进行完整的构建,也可以进行MSI。从那里开始,我们有一个系统测试版本,可以在使用虚拟机(使用单独的域控制器,SQL Server框等)构建的环境中运行更深入的测试。当系统测试通过时,构建可供我们的QA部门进行手动测试和一些我们尚未自动化的回归测试。

#10


In the java space I've tested most of the available build environments. The issue with automatic build is that you quite often end up spending a fair amount of time following it up. After we switched to the commercial bamboo from atlassian, we found that we have to spend a lot less time pampering the build box, which in our case turns out to be very good economy. Bamboo also supports clustering, so you can add inexpensive boxes as needs evolves.

在java空间中,我测试了大多数可用的构建环境。自动构建的问题在于,您经常会花费相当多的时间来跟进它。在我们从atlassian切换到商业竹子之后,我们发现我们必须花费更少的时间来呵护构建盒子,在我们的情况下,这是非常好的经济。 Bamboo还支持群集,因此您可以根据需求增加廉价的盒子。

#11


Try & find something that fits in with your existing practices in terms of building - e.g. it's not going to be a good fit to try & use an Ant-based buildserver if you're using Maven, for instance!

在建筑方面尝试找到适合您现有做法的内容 - 例如例如,如果您正在使用Maven,那么尝试使用基于Ant的构建服务器并不合适!

Ideally, it should just be able to monitor your source-control system, checkout the code, build, run some tests & publish the results without you being aware of it, or at least not 'till it's reporting a failure. Personally, I'd suggest Hudson (https://hudson.dev.java.net/) as a good starting point as it's easy to get installed & running & has a decent UI.

理想情况下,它应该能够监控您的源代码控制系统,检查代码,构建,运行一些测试并发布结果,而不会发现它,或者至少不会“直到它报告失败”。就个人而言,我建议Hudson(https://hudson.dev.java.net/)作为一个很好的起点,因为它很容易安装和运行并具有不错的用户界面。

#12


We start by writing batch scripts that will run on the developers machine. Once we have all the processes automated, we move them to the build server.

我们首先编写将在开发人员机器上运行的批处理脚本。一旦我们将所有流程自动化,我们就将它们移动到构建服务器。

On the tools side we are currently moving from Cruise Control to TFS.

在工具方面,我们目前正在从Cruise Control转向TFS。