build - 在运行参数 [Hudson] 中指定的构建中引用信息

标签 build continuous-integration hudson

第 1 天使用 Hudson 对于我们的 CI 构建。缓慢但肯定地加快速度。

我的问题是关于运行参数。我已经看到我可以使用它们来引用特定项目的特定运行 - 这一切都很好。

我不明白(并且找不到任何文档 - Parameterized Build 没有任何内容)是我如何引用 run 参数定义的运行中的任何内容。
基本上我想引用 %BUILD_NUMBER%%SVN_REVISION%在运行参数中选择的运行。

我怎样才能做到这一点?

最佳答案

你真的需要为你的工作添加额外的属性值、额外的参数吗?

BUILD_NUMBERSVN_REVISION已经定义为环境变量(见 Building a software project ),你可以在你的工作中使用它们。

When a Hudson job executes, it sets some environment variables that you may use in your shell script, batch command, or Ant script



Shell Script

或者:

Ant Script

说明您已经拥有这些值(value)。
然后,您可以使用它们在 shell 或 ant 脚本中定义其他环境变量/属性。

当涉及将变量值从一个作业传递到另一个作业时,Parameterized Trigger Plugin应该做的伎俩:

The parameters section can contain a combination of one or more of the following:



Build parameters

  • a set of predefined properties
  • properties from a properties file read from the workspace of the triggering build
  • the parameters of the current build
  • "Subversion revision": makes sure the triggered projects are built with the same revision(s) of the triggering build.
    You still have to make sure those projects are actually configured to checkout the right Subversion URLs.


注意: 可能存在问题Join Plugin ,当参数化触发器起作用时,这可能不起作用。

关于build - 在运行参数 [Hudson] 中指定的构建中引用信息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3412910/

相关文章:

java - 默认排除 gradle 测试

c# - Monorail - 是否有类似于 Rails 3 Assets 管道的 C# 构建工具?

performance - MongoDB大索引构建很慢

node.js - 如何在 Hudson 中显示 Expresso 和 node-jscoverage 输出?

batch-file - 系统在Jenkins中找不到指定的驱动器

.net - CI : Hudson with . 网络与 CruiseControl.Net

gradle - 设置Gradle子项目的属性

gradle - gradle项目子模块中的端到端测试

jenkins - Gradle + Jenkins + Artifactory Pro:发布阶段和升级

eclipse - 如何配置 Eclipse 以自动运行测试?