How to fetch the Value of Teamcity Configuration in java?

你。 提交于 2019-12-11 03:54:51

问题


I have a piece of java code where I have to display the Teamcity build configuration name. This piece of code will be executed in one of the steps configured for the configuration.

can we read value of the env variable %env.TEAMCITY_BUILDCONF_NAME% set in Teamcity configuration settings and use or is there anyother way of o fetching the Value of Teamcity Configuration Name?


回答1:


yes, you just need to read the environment variable value in the code.

This should get what you need:

final String buildConfigName = System.getenv("TEAMCITY_BUILDCONF_NAME");


来源:https://stackoverflow.com/questions/30751034/how-to-fetch-the-value-of-teamcity-configuration-in-java

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!