简体   繁体   English

Delphi 持续集成系统

[英]Continuous Integration System for Delphi

Are there any CI-Systems for Delphi like Hudson for Java?有没有像 Hudson for Java 那样的 Delphi 的 CI 系统? Does Hudson has any Delphi integrations? Hudson 是否有任何 Delphi 集成?

We use Hudson :), which works just fine with Delphi.我们使用 Hudson :),它与 ​​Delphi 一起工作得很好。

Here's a complete setup for one of my projects:这是我的一个项目的完整设置:

<?xml version='1.0' encoding='UTF-8'?>
<project>
  <actions/>
  <description></description>
  <keepDependencies>false</keepDependencies>
  <properties/>
  <scm class="hudson.scm.CVSSCM">
    <cvsroot>:sspi:cvsonly:foo@bar:/baz</cvsroot>
    <module>SIP</module>
    <canUseUpdate>false</canUseUpdate>
    <flatten>true</flatten>
    <isTag>false</isTag>
    <excludedRegions></excludedRegions>
  </scm>
  <canRoam>true</canRoam>
  <disabled>false</disabled>
  <triggers class="vector"/>
  <builders>
    <hudson.tasks.BatchFile>
      <command>&quot;C:\Program Files\Nant\bin\nant&quot; -buildfile:etc\sip.build build-d7 test</command>
    </hudson.tasks.BatchFile>
  </builders>
  <publishers>
    <hudson.tasks.BuildTrigger>
      <childProjects>quux, foozle, wibble</childProjects>
      <threshold>
        <name>SUCCESS</name>
        <ordinal>0</ordinal>
        <color>BLUE</color>
      </threshold>
    </hudson.tasks.BuildTrigger>
  </publishers>
  <buildWrappers/>
</project>

sip.build's delphi-7 target builds the project's test suite (DUnit's TextTestRunner) and so the output of the job is simply the count of failed/error tests thanks to: sip.build 的 delphi-7 目标构建了项目的测试套件(DUnit 的 TextTestRunner),因此作业的输出只是失败/错误测试的计数,这要归功于:

var
  R: TTestResult;

begin
  R := TextTestRunner.RunRegisteredTests;
  ExitCode := R.ErrorCount + R.FailureCount;
end;

我们使用CruiseControl.NET ,它与 Delphi 完美配合。

It seems Embarcadero itself uses Hudson.似乎 Embarcadero 本身使用 Hudson。 See the comment from Nick Hodges, Development Manager at Embarcadero.请参阅 Embarcadero 开发经理 Nick Hodges 的评论。 http://blogs.embarcadero.com/nickhodges/2010/03/10/39369#comment-29952 http://blogs.embarcadero.com/nickhodges/2010/03/10/39369#comment-29952

Hudson is great, it is also available as MSI setup . Hudson很棒,它也可用作MSI 设置 Users of older Delphi versions (pre MSBuild), can create build scripts with the popular Apache Ant and NAnt build script environments.旧 Delphi 版本(MSBuild 之前)的用户可以使用流行的 Apache Ant 和 NAnt 构建脚本环境创建构建脚本。 Simple command line (batch script) builds are possible too of course.当然,简单的命令行(批处理脚本)构建也是可能的。

One of the highlights of this installer is that it comes with a JRE, to be fully self-contained.此安装程序的亮点之一是它带有 JRE,完全独立。 This is because Windows users don't normally know what to do with the *.war file, and they generally don't like going to the command prompt and running Java command manually.这是因为 Windows 用户通常不知道如何处理 *.war 文件,而且他们通常不喜欢进入命令提示符并手动运行 Java 命令。

So it is easy to try without going through too many installers and command lines first.因此,无需先通过太多安装程序和命令行即可轻松尝试。

And after installation make sure to visit the plug in page in the administration app, there are many extensions available which are also useful for Delphi developers.安装后确保访问管理应用程序中的插件页面,有许多扩展可用,对 Delphi 开发人员也很有用。 A plugin overview is online here .插件概述在这里在线。

Hudson tools for Delphi: there is also a Code Coverage tool for Delphi with Hudson support here .哈德森工具德尔福:还有一个代码覆盖工具,德尔福与哈德森支持这里

TeamCity is another very nice CI system. TeamCity是另一个非常好的 CI 系统。 It is a commercial product, but offers a free license for up to 20 users and 20 build configurations on 3 build agents.它是一种商业产品,但为最多 20 个用户和 3 个构建代理上的 20 个构建配置提供免费许可证。

Bamboo is a CI system for any language. Bamboo是适用于任何语言的 CI 系统。 It is available from Atlassian.它可以从 Atlassian 获得。 Its price starts at $10 - this includes all features and unlimited users, but limited to 10 plans, running builds only on the server where it is installed.它的起价为 10 美元 - 这包括所有功能和无限用户,但仅限于 10 个计划,仅在安装它的服务器上运行构建。 It can use Amazon Elastic Compute Cloud instances as remote agents.它可以使用 Amazon Elastic Compute Cloud 实例作为远程代理。

Automated Build Studio from SmartBear. SmartBear 的自动构建工作室 With Automated Build Studio Server, it introduced CI some time before FinalBuilder.在Automated Build Studio Server 中,它在FinalBuilder 之前引入了CI。

We use jenkins .我们使用詹金斯 Jenkins has a RAD Studio plugin to integrate the compilation of Delphi projects into jobs. Jenkins 有一个RAD Studio 插件,可以将 Delphi 项目的编译集成到作业中。 It's not mandatory to use it (plugin), we use command-line tools and MSBuild to compile the projects.使用它(插件)不是强制性的,我们使用命令行工具和 MSBuild 来编译项目。

Theproject DUnItX (to create unit testing) integrates seamlessly with Jenkins. 项目 DUnItX (用于创建单元测试)与 Jenkins 无缝集成。

Here you can find some articles about the integration of Jenkins and Delphi.在这里你可以找到一些关于 Jenkins 和 Delphi 集成的文章。 Introduction, installation,... Are in Spanish but you can translate without problems and with included images and code are quite simple.介绍、安装、...是西班牙语,但您可以毫无问题地进行翻译,并且包含图像和代码非常简单。

1- Integración continua con Delphi (GIT) (INTRODUCTION) 1- Integración continua con Delphi (GIT) (介绍)
2- Integración continua con Delphi (Jenkins) – Instalación (INSTALLATION) 2- Integración continua con Delphi (Jenkins) – Instalación (INSTALLATION)
3- Integración continua con Delphi (Jenkins) – Primer proyecto (FIRST PROJECT) 3- Integración continua con Delphi (Jenkins) – Primer proyecto (FIRST PROJECT)
4- Integración continua con Delphi (Jenkins) – Pipelines (USE OF PIPELINES) 4- Integración continua con Delphi (Jenkins) – 管道管道的使用)

将我们的Parabuild添加到要检查的工具列表中——它几乎构建了任何可以从命令行构建的东西——包括 Delphi,它提供了与 Perforce 和其他版本控制系统(如 Git 和 Bazaar)的集成。

We use Jenkins CI system with Owly CI tool as the build system and dependency handler.我们使用 Jenkins CI 系统和Owly CI工具作为构建系统和依赖项处理程序。

Take a look on this tutorial看看这个教程

Initial setup takes less than 5 minutes初始设置只需不到 5 分钟

Hudson is simple to use, with some web-based assistants, as Delphi projects are built with MSBuild. Hudson使用简单,带有一些基于 Web 的助手,因为 Delphi 项目是使用 MSBuild 构建的。

If you need more customization and 3rd party tools integration (integrate metrics tools for example) then CruiseControl.NET is the ideal solution.如果您需要更多自定义和 3rd 方工具集成(例如集成指标工具),那么CruiseControl.NET是理想的解决方案。

Have a look to my CC.NET Dashboard page for DelphiCodeToDoc (and you can have a look to the configuration file also).看看我的CC.NET Dashboard page for DelphiCodeToDoc (你也可以看看配置文件)。 I'm doing checkout + compilation of gui and command line version and unit test + unit test execution and report + ftp upload build delivery .我正在做结帐+gui和命令行版本的编译以及单元测试+单元测试执行和报告+ftp上传构建交付

Just to throw my support for CruiseControl.NET, as Delphi 2007 and above are based around MSBuild, then there should be no problem with builds via CC.NET.只是为了表达我对 CruiseControl.NET 的支持,因为 Delphi 2007 及更高版本基于 MSBuild,那么通过 CC.NET 构建应该没有问题。 There is a patch somewhere for DUNit, so that it outputs the results to an XML file, and this can then be integrated into the builds results charts. DUUnit 的某个地方有一个补丁,因此它将结果输出到 XML 文件,然后可以将其集成到构建结果图表中。

errrm, can you define what you are actually looking for? errrm,你能定义你真正在寻找什么吗?

You use the phrase continuous integration , but do you just mean continuous build to make sure it compiles and likes, or do you actually mean continuous integration in the sense that you also run regression tests?您使用了“ continuous integration这个短语,但您的意思是continuous build以确保它可以编译和喜欢,还是实际上是指在您还运行回归测试的意义上的continuous integration

I would be curios as to how you do that (Auto-it?).我会好奇你是如何做到这一点的(Auto-it?)。

Not that it really matters too much, because the wonderful Hudson (which is decidedly not just for java) has numerous plug-ins, but will also allow you to execute a DOS batch script - any script that you care to write, to build, to test, to report results, etc.不,它真正的问题太多,因为精彩的哈德森(这是决然不会只是JAVA)有众多的插件,也可以让你执行一个DOS批处理脚本-任何脚本,你愿意写,打造,测试,报告结果等。

Another option (although not free, $10 for limited # of users) is Atlassian Bamboo .另一种选择(虽然不是免费的,有限数量的用户 10 美元)是Atlassian Bamboo And JetBrains TeamCity is another that is free (with limited # of users). JetBrains TeamCity 是另一个免费的(用户数量有限)。 I've tried both with Delphi 2009/2010, and they work quite well.我在 Delphi 2009/2010 上都试过,它们工作得很好。 Both allowed integration with Perforce among other SCM's.两者都允许与其他 SCM 中的 Perforce 集成。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM