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

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

问题描述

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



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

解决方案

由于TeamCity 9.0可以通过在依赖构建中重新定义依赖关系参数

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


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.

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

解决方案

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天全站免登陆