引用运行参数中指定的构建中的信息 [Hudson]
第一天,使用 Hudson 进行 CI 构建。缓慢但肯定会加快速度。
我的问题是关于运行参数。我已经看到我可以使用它们来引用特定项目的特定运行 - 这一切都很好。
我不明白(并且找不到任何文档 - 参数化构建)是我在运行中引用运行参数定义的任何内容的方式。
本质上,我想引用运行参数中选择的运行的 %BUILD_NUMBER%
和 %SVN_REVISION%
。
我怎样才能做到这一点?
Day 1 with using Hudson for our CI build. Slowly but surely getting up to speed.
My question is about run parameters. I've seen that I can use them to reference a particular run of a particular project - that's all fine.
What I don't understand (and can't find any documentation on - there's nothing at Parameterized Build) is how I refer to anything in the run defined by the run parameter.
Essentially I want to reference the %BUILD_NUMBER%
and %SVN_REVISION%
of the run that is selected in the run parameter.
How can I do that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您真的需要为您的工作添加额外的属性值、额外的参数吗?
由于
BUILD_NUMBER
和SVN_REVISION
已定义为环境变量(请参阅构建软件项目),您可以在工作中使用它们。或:
说明您已经可以使用这些值。
然后您可以使用它们在 shell 或 ant 脚本中定义其他环境变量/属性。
当需要将变量值从一个作业传递到另一个作业时,< strong>参数化触发器插件应该可以解决这个问题:
注意:加入插件可能存在问题,当参数化触发器运行时,这可能不起作用。
Do you really need to add extra property values, extra parameters for your job?
Since
BUILD_NUMBER
andSVN_REVISION
are already defined as environment variables (see Building a software project), you can use those in your job.or:
illustrates you already have those values at your disposal.
You can then use them to define other environment variables/properties within your shell or ant script.
When it comes to pass a variable value from one job to another, the Parameterized Trigger Plugin should do the trick:
Note: there might be an issue with the Join Plugin, which might not work when the Parameterized Trigger is in action.