Teamcity:将环境参数传递给依赖构建

发布于 2024-08-21 10:28:02 字数 131 浏览 6 评论 0原文

我使用两种构建配置。

  • Root
  • Sub

“Sub”的构建文件需要环境参数“Param”才能运行。我可以将此参数从“根”配置传递到 Teamcity 中的“子”配置吗?

I use two build configurations.

  • Root
  • Sub

The buildfile for 'Sub' requires a environment parameter 'Param' to run. Can I pass this parameter from my 'Root' configuration to the 'Sub' configuration in Teamcity.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

恏ㄋ傷疤忘ㄋ疼 2024-08-28 10:28:02

每个构建配置都有一个配置代码即bt123
假设您的根配置具有代码 bt123,并且有一个名为 java_dir 的变量

您的子配置可以像这样引用它

名称:JAVA_DIR
值:%dep.bt123.env.JAVA_DIR%

最简单的方法是选择文本字段“Value”右侧带有线条的小框。这将提供一个下拉列表,您应该能够在其中找到 bt123 中的变量。只需输入 bt123 开始,您将看到所有可用的变量。

希望这有帮助。

以下是有关依赖项属性的版本 10 文档的链接。

https://confluence.jetbrains.com/display/TCD10/ Predefined+Build+Parameters#PredefinedBuildParameters-DependencyProperties

这些选项至少从 TeamCity 8.x 起就可用。

Each build configuration has a configuration code i.e. bt123
Let's say your Root configuration has the code, bt123, and has a variable called java_dir

Your Sub configuration, can reference it like this

Name: JAVA_DIR
Value: %dep.bt123.env.JAVA_DIR%

The easiest way to do this, is to select the small box with lines in the right of the text field, "Value". This will provide a drop list where you should be able to find the variable from bt123.. Just start by typing bt123, and you will see all the variables available.

Hope this helps.

Here is a link to the version 10 documentation regarding dependency properties.

https://confluence.jetbrains.com/display/TCD10/Predefined+Build+Parameters#PredefinedBuildParameters-DependenciesProperties

These options have been available since at least TeamCity 8.x.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文