将环境变量(参数)传递给 TeamCity 中的依赖项目 [英] Passing an environment variable (parameter) to dependency project in TeamCity

查看:12
本文介绍了将环境变量(参数)传递给 TeamCity 中的依赖项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含两个项目的构建链:A 是根项目,B 依赖于它.B 配置了两个依赖项:一个工件和一个快照依赖项.B 的一个构建配置有一个环境变量(参数)集.但是,我也需要为根项目A设置这个参数.

I have a build chain with two projects: A is the root project, B depends on it. B has two dependencies configured: an artifact and a snapshot dependency. One build configuration for B has an environment variable (parameter) set. However, I also need this parameter set for the root project A.

TeamCity 9 中是否有任何方法可以将构建配置参数从项目传递到其依赖项(在同一构建链中)?

Is there any way in TeamCity 9 to pass a build configuration parameter from a project to its dependency (in the same build chain)?

推荐答案

从 TeamCity 9.0 开始,可以 通过在依赖构建中重新定义依赖参数来覆盖它们:

Since TeamCity 9.0 it is possible to override the dependencies parameters by redefining them in the dependent build:

reverse.dep.<btID>.<property name>

这篇关于将环境变量(参数)传递给 TeamCity 中的依赖项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆