gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-04 21:25:47 27 4
gpt4 key购买 nike

第 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/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com