简体   繁体   English

下游作业使用与哈德森上游作业相同的内部版本号和颠覆版本

[英]Downstream job to use the same build number and subversion revision as the upstream job in Hudson

I have seen some duplicate questions but the answers didn't seem to help. 我看到了一些重复的问题,但答案似乎并没有帮助。 The following is what I need: I have the upstream Job A and its downstream Job B. I use parameterized trigger plugin to kick off Job B once Job A finishes successfully. 我需要以下内容:我有上游Job A及其下游JobB。一旦Job A成功完成,我就使用参数化触发器插件启动JobB。

I want the kicked off Job B to have the same build number and use the same SVN revision which Job A used to simplify things (Both jobs use separate workspaces BTW.) 我希望启动的作业B具有相同的内部版本号,并使用与作业A用于简化操作的相同SVN版本(两个作业都使用单独的工作区BTW。)

Under Job A, I checked the "Trigger parameterized build on other projects" and added the subversion revision and current build parameters to the parameters for Job B when stable. 在作业A下,我检查了“在其他项目上触发参数化的构建”,并在稳定时将Subversion版本和当前构建参数添加到作业B的参数中。

Under Job B, I checked the "This build is parameterized" and used SVN_REVISION as a string parameter with default HEAD; 在作业B下,我检查了“此构建已参数化”,并使用SVN_REVISION作为带有默认HEAD的字符串参数; and BUILD_NUMBER as a run parameter of Job A. Under SCM, for SVN url, I entered: http:// svn-path-here/trunk@$SVN_REVISION 和BUILD_NUMBER作为作业A的运行参数。在SCM下,对于SVN网址,我输入:http:// svn-path-here / trunk @ $ SVN_REVISION

Doing this always pulls the HEAD and uses different build number. 这样做总是会拉HEAD并使用不同的内部版本号。 Any help is appreciated. 任何帮助表示赞赏。 Thanks. 谢谢。

A quick web search reveals: 快速的网络搜索显示:

  • With the parametrized build trigger, you need to use a "peg revision" in the SVN URL. 使用参数化的构建触发器,您需要在SVN URL中使用“ peg修订版”。 Eg .../repository/trunk@${SVN_REVISION} 例如.../repository/trunk@${SVN_REVISION}
  • Or you can use Tracking SVN plugin . 或者,您可以使用Tracking SVN插件

See this thread . 看到这个线程

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

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