本文整理汇总了Java中jetbrains.buildServer.serverSide.TeamCityProperties.getProperty方法的典型用法代码示例。如果您正苦于以下问题:Java TeamCityProperties.getProperty方法的具体用法?Java TeamCityProperties.getProperty怎么用?Java TeamCityProperties.getProperty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类jetbrains.buildServer.serverSide.TeamCityProperties
的用法示例。
在下文中一共展示了TeamCityProperties.getProperty方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getToolPath
import jetbrains.buildServer.serverSide.TeamCityProperties; //导入方法依赖的package包/类
@Nullable
private static String getToolPath(@NotNull final BuildAgentConfiguration configuration) {
final String rpctoolPath = TeamCityProperties.getProperty(RPC_TOOL_PARAMETER);
if (StringUtil.isNotEmpty(rpctoolPath)){
return rpctoolPath;
}
if (SystemInfo.isUnix) { // Linux, MacOSX, FreeBSD
final Map<String, String> envs = configuration.getBuildParameters().getEnvironmentVariables();
final String path = envs.get("PATH");
if (path != null) for (String p : StringUtil.splitHonorQuotes(path, File.pathSeparatorChar)) {
final File file = new File(p, VMWARE_RPCTOOL_NAME);
if (file.exists()) {
return file.getAbsolutePath();
}
}
}
if (SystemInfo.isLinux) {
return getExistingCommandPath(LINUX_COMMANDS);
} else if (SystemInfo.isWindows) {
return getExistingCommandPath(WINDOWS_COMMANDS);
} else if (SystemInfo.isMac) {
return getExistingCommandPath(MAC_COMMANDS);
} else {
return getExistingCommandPath(LINUX_COMMANDS); //todo: update for other OS'es
}
}
示例2: getFileSizeThreshold
import jetbrains.buildServer.serverSide.TeamCityProperties; //导入方法依赖的package包/类
private long getFileSizeThreshold() {
String strValue = TeamCityProperties.getProperty(FILE_SIZE_THRESHOLD, DEFAULT_FILE_SIZE_THRESHOLD);
try {
return StringUtil.parseFileSize(strValue);
} catch (NumberFormatException e) {
Loggers.SERVER.warnAndDebugDetails("incorrect value " + strValue + " for file size threshold property", e);
try {
return StringUtil.parseFileSize(DEFAULT_FILE_SIZE_THRESHOLD);
} catch (NumberFormatException nfe) {
Loggers.SERVER.warnAndDebugDetails("incorrect default value " + DEFAULT_FILE_SIZE_THRESHOLD + " for file size threshold property", nfe);
}
}
return 10*1024*1024;//10mb
}
示例3: getOwnTorrentAddress
import jetbrains.buildServer.serverSide.TeamCityProperties; //导入方法依赖的package包/类
@NotNull
@Override
public String getOwnTorrentAddress() {
return TeamCityProperties.getProperty(OWN_ADDRESS, "");
}
示例4: getAgentAddressPrefix
import jetbrains.buildServer.serverSide.TeamCityProperties; //导入方法依赖的package包/类
@NotNull
@Override
public String getAgentAddressPrefix() {
return TeamCityProperties.getProperty(PREFIX_ADDRESS, "172.");
}