简体   繁体   English

如何将上游构建的二进制文件传递给远程下游构建从属服务器

[英]How to pass binaries built upstream to a remote downstream build slave

We're using Hudson on Windows to build a .NET solution and run the unit tests (NUnit). 我们在Windows上使用Hudson来构建.NET解决方案并运行单元测试(NUnit)。 Hudson is thereby used to start batch files that do the actual work. 因此,Hudson用于启动执行实际工作的批处理文件。

I am now trying to set up a new test that is to run on a build slave and will run very long. 我现在正在尝试建立一个在构建从站上运行的新测试,并且运行时间很长。 The test should use the binaries produced by the upstream build. 测试应使用上游构建生成的二进制文件。

I have searched the Hudson documentation but I cannot find how to pass upstream build artifacts to downstream slaves. 我搜索了Hudson文档,但是我找不到如何将上游构建工件传递给下游从站。 How do I do this? 我该怎么做呢?

Use the Copy Artifact plugin in your downstream build. 在下游构建中使用Copy Artifact插件

Just specify the name of the upstream job and the paths to copy into your downstream workspace. 只需指定上游作业的名称以及要复制到下游工作区的路径。

Depending on the source control management you are using, you could cheat and use that. 根据您使用的源代码管理,您可以作弊并使用它。 i am not a fan of checking in binaries, especially if they are large. 我不是检查二进制文件的粉丝,特别是如果它们很大的话。 But I have in the past taken generated binaries or installers generated via a CI build, automated the check in of them into a separate svn repository and had the slave machine pull from that repo when dictated by the master and perform whatever tests you are needed to execute. 但我过去通过CI构建生成了生成的二进制文件或安装程序,自动将它们签入到单独的svn存储库中,并且当主服务器指示从属机器从该存储库中取出并执行所需的任何测试时执行。

It might be a little bit overkill for you, if you are only dependent on the binaries. 如果你只依赖于二进制文件,那对你来说可能有点矫枉过正。 But there is also the Clone Workspace SCM Plugin , which archives your whole workspace and you could check it out with the next job as if it would come from an SCM. 但是还有克隆工作区SCM插件 ,它可以存档您的整个工作区,您可以在下一个工作中查看它,就像它来自SCM一样。 It is pretty new. 这是非常新的。

We currently use a different setup. 我们目前使用不同的设置。 We have an Artifact Repository, where we push our binaries. 我们有一个Artifact Repository,我们推送我们的二进制文件。 The second job pulls the binaries from that repository. 第二个作业从该存储库中提取二进制文件。 Physically it is just a standard Windows share, where we create a subfolder with thw job build number in it. 从物理上讲,它只是一个标准的Windows共享,我们在其中创建一个带有作业内部版本号的子文件夹。 If you also use the [Parameterized Trigger Plugin][2] you can pass the build number from job 1 to job 2 and run your test on the right binary. 如果您还使用[参数化触发器插件] [2],您可以将作业编号从作业1传递到作业2,并在正确的二进制文件上运行测试。 The side effect is, that you can reuse the binaries later without keeping a long history with in Hudson. 副作用是,您可以在以后重复使用二进制文件,而无需在Hudson中保留较长的历史记录。

[2]: http://Parameterized Trigger Plugin [2]: http://参数化触发插件

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

相关问题 如何构建两个二进制.NET Core 2控制台应用程序 - How to build two binaries .net core 2 console app Ocelot - 更改网关中的上游请求正文不会导致下游请求发生变化 - Ocelot - Changing the upstream request body in gateway causes no change on downstream request 如何在MSBuild构建的Azure Cloud Service包中启用远程调试 - How to enable remote debugging in Azure Cloud Service package built by MSBuild Visual Studio更新不应构建的项目的二进制文件 - Visual Studio updates binaries of project which is not supposed to be built 如何将构建属性传递给dotnet? - How to pass build properties to dotnet? MSBuild-构建后捕获二进制文件,而不考虑构建配置或框架? - MSBuild - Post-Build capture binaries regardless of build configuration or framework? 如何在远程服务器上构建 .net 应用程序? - How do I build a .net application on a remote server? 如何使用.NET中的二进制文件安全地分发密钥? - How to distribute keys securely with binaries in .NET? 如何从二进制文件中以Azure部署Web服务 - How to deploay an webservice in azure from binaries 下游的TPL数据流块如何获取源生成的数据? - How can a TPL Dataflow block downstream get data produced by a source?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM