[英]How to build many projects with the same svn revision number with hudson?
I'm just starting with hudson and I'd like to build my projects like my handmade solution did before: 我只是从哈德森开始,我想像我以前做过的手工解决方案一样构建我的项目:
Just to extend the sjohnston post. 只是为了扩展sjohnston帖子。 Instead of checking the code out to a known location, you can use the Clone Workspace SCM Plugin .
您可以使用Clone Workspace SCM插件 ,而不是将代码检查到已知位置。 Now you can reference the checkout from the first job.
现在您可以参考第一份工作的结账。
In addition you can just pass around the revision number and pass it as a parameter to your build jobs. 此外,您只需传递修订号,并将其作为参数传递给构建作业。 The build jobs can than retrieve the right version of code by using the revision number.
构建作业可以使用修订号来检索正确的代码版本。
Hudson doesn't really have good support for making a single SVN check-out and then using it for several different jobs. Hudson并没有真正支持单个SVN签出然后将其用于几个不同的工作。
You could try this: 你可以试试这个:
It sounds messy and potentially fraught with problems, but it might work. 这听起来很混乱,可能充满问题,但它可能会奏效。
Alternately, if you want to just chain all these projects together, you could set up a single job that does the checkout and has a build step for each project. 或者,如果您只想将所有这些项目链接在一起,则可以设置一个执行结帐的作业,并为每个项目创建一个构建步骤。 Then you could just check the Build Periodically trigger to have it run as often as you want (or at least as often as Hudson can get through the tasks).
然后你可以只检查Build周期性触发器,让它按照你想要的频率运行(或者至少和Hudson可以完成任务一样频繁)。
My take on the problem: 我对这个问题的看法:
Use the SVN post-commit hook to trigger a preliminary job which a) checks out the code; 使用SVN post-commit钩子来触发初步工作,a)检查代码; b) gets the SVN revision (eg via SVNVERSION.EXE);
b)获取SVN修订版(例如通过SVNVERSION.EXE); and c) uses the Parameterized Trigger plugin to trigger the "real" build job at the specific SVN revision ID.
c)使用参数化触发器插件触发特定SVN修订版ID的“真实”构建作业。
This way you separate the SCM connection from the actual building, so that you can be very specific about building every revision. 这样您就可以将SCM连接与实际构建分开,这样您就可以非常具体地构建每个修订版本。
you can always add a shell script as a build step. 您始终可以添加shell脚本作为构建步骤。
use a parameterized build, declare the revision as parameter, use the parameter in your shell script (skipping Hudson SCM management entirely) 使用参数化构建,将修订声明为参数,在shell脚本中使用该参数(完全跳过Hudson SCM管理)
http://wiki.hudson-ci.org/display/HUDSON/Parameterized+Build http://wiki.hudson-ci.org/display/HUDSON/Parameterized+Build
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.