English 中文(简体)
B. 建立依赖项目和多个开发商的建设进程
原标题:Setting up build process for dependent projects and multiple developers

我为建筑流程自动化和不断整合工作投入了相当新的空间,并正在为小型开发商建立建筑流程/服务器。 我们正在使用SVN、CMake和Jenkins建造服务器。 资料来源:C++。

让我们说,我们有两个项目:library(a dll)和executable。 与<代码>library的链接,以便建立<代码>可执行 页: 1 接着,为了操作<条码>可执行<>条码>,您需要<条码>(并且可能还有条形符号)>。

在整件材料建设过程中,你从存放处获得最新来源,并建造<编码>library,然后建立<编码>可执行<>。

然而,我们有多个开发商,每个开发商通常在某个时候从事一个项目。 我们的CMake文字使你能够选择哪些项目来建设,例如<代码>。 www.un.org/chinese/ga/president 放弃不是一种选择。

因此,如果<代码>Bob对library进行修改,并投入源头,John将需要获得汇编的校正和校正文档(因为没有编辑<编码>library)。

如今,双双双手都在 s。 在每次汇编中,作为预选步骤的CMake份数(将适当的双倍数列入<代码>build/bin至,然后将任何项目汇编成册(将适当的双倍数贴在build/bin上),最后一份CMake份(build/bin至>>>。

This means that when Bob makes a change, he commits not only the source files but the compiled binary as well, and when John updated his working copy he gets the appropriate binaries, and doesn t have to do any manual file replacement.

当时一直在努力,但出于几个原因,我确实不喜欢。 难道没有哪一种 ha淡的方式来做这样的事情? (实际上有4个开发商,约有12个项目,有些是图书馆,没有任何东西依赖,有些是依靠其他图书馆的图书馆,有些是依靠其他图书馆的迫害者。)

Edit: This is the process I m thinking of:

Use an artifact tracking system such as Artifactory or Nexus to store binaries after build, along with the header files used to generate those binaries

在CMake,每个项目都有汇编或预编。 汇编的项目由定期存放处生成。 预先设计的项目双筒和头盔如果过期,则从Nexus下载,而CMake链接则适当包括。 我在Dave Bacher的回答中描述的种族状况,也使领导人掌握了手工艺。

The only thing I don t like is that I ll have to do some CMake-foo to check if the artifacts are out of date and download them, but I guess there isn t really an alternative since apparently what I m trying to set up is so nonstandard.

问题回答

我不喜欢你把在开发商的建筑中进行重新检查,作为其他人将从中汲取的坦诚提法。 它很脆弱,你最终能够靠坏的建筑为一人在其环境中工作,但其他人却失败。 或者,某人做了改动,但忘记了在档案中检查,突然,他们是唯一能够建设项目一部分的人。

至少,你应设立Jenkins,作为建立图书馆和可起诉人的地方,使你的开发商只能从源头检查。 Jenkins有几处原始材料(例如SVN Publisher),可用来在贵标准建筑环境中建造这些图书馆和可执行物品。

根据我的经验,在建造机器上安装Jenkins,并为你们每个项目建立建筑,是非常直接的。 第一步是核实每个项目是否建构。 然后,努力让Jenkins公布其产出,而不是依靠开发商公布其建筑。

它像目前实行的制度一样,总是在那些修改可诉人与图书馆之间有种族条件。 我建议,你不要集中精力解决所有开发商的种族条件,而是利用 CI来应对从种族条件中可能出现的问题。

由于你刚刚开始,我将保持简单易懂,并集中努力创造一份“Jenkins”职位,在把一些事情检查到存放处时,就能够形成整个工作。 假设图书馆和可执行图书馆存放在同一特别志愿人员国家存放处,工作行动就应当如此:

  1. Check out the repository
  2. Execute CMake to build the library
  3. Do any unit tests for the library (there are some, right?)
  4. Execute CMake to build the executable against the library
  5. Do any unit tests for the executable (there are some, right?)
  6. Notify the developers of the results of the build.

虽然这似乎微不足道,但是如果开发商在改变时不强迫他们记住更新复制件,就会得到反馈。 还将帮助他们融入与 CI合作的范例转变。

[BTW, the one gotcha the developers may run into is if they are used to checking into SVN a file at a time. Doing file-by-file changes will kick off multiple builds that only succeed when the last file is finally checked in. Check ins of multiple files need to be done as atomic actions with multiple files at a time. This is also good SCM practice as it groups the changes together into one thing that can be tracked and (if needed) rolled back.]

范式转变首先可能无法克服,但可以发生。 我目前正在与开发商共同开展该项目,这些开发商与你上文所述的类似进程相类似。 当我们去管理 CI时,人们往往比每周一次难以检查法典。 8个月后,如果我不得不为Jenkins大楼做任何维修,我就立即无遗地问为什么有Jenkinsn公司,以及“如果他们能够立即收回建筑成果,我会怎样指望人们工作?”





相关问题
Best practices for Subversion and Visual Studio projects

I ve recently started working on various C# projects in Visual Studio as part of a plan for a large scale system that will be used to replace our current system that s built from a cobbling-together ...

Changing username in SVN+SSH URI on the fly in working copy

I am using SVN+SSH to check out a working copy of repository from an SVN server on which all developers are members of a developer group and have full read/write permissions on the repository ...

ASP.NET MVC: How should it work with subversion?

So, I have an asp.net mvc app that is being worked on by multiple developers in differing capacities. This is our first time working on a mvc app and my first time working with .NET. Our app does not ...

How to search for file in subversion server?

Is there a way to search for a file in a subversion repository? Something similar to Unix find command, with which I can find the location of a file in a repository. I know there is svn list, but ...