【发布时间】:2015-01-10 20:19:06
【问题描述】:
我想在构建配置的一个步骤中设置一些描述的变量,我可以在另一个步骤中使用。
所以在第 1 步中我设置了变量,在第 2 步中我读取了变量
这可能吗?
【问题讨论】:
标签: teamcity
我想在构建配置的一个步骤中设置一些描述的变量,我可以在另一个步骤中使用。
所以在第 1 步中我设置了变量,在第 2 步中我读取了变量
这可能吗?
【问题讨论】:
标签: teamcity
要做到这一点在相同的构建配置中,您需要使用service messages
要在同一项目内共享构建配置,您可以通过项目参数来实现。目前从 TeamCity 8.1 开始,要在构建中设置它,您需要添加一个步骤来运行 curl.exe 实用程序并通过 TeamCity REST API 设置参数值。
C:\Path\To\curl.exe -v --request PUT -d "YourParamValue" --Header "Content-Type: text/plain" http://YourUser:YourPassword@YourTeamcity.server.local:port/httpAuth/app/rest/projects/YourProjectName/parameters/YourParameter
相关:Teamcity, set configuration parameter for next build
TeamCity, passing an id generated in one build step to a later build step
【讨论】: