Package jetbrains.buildServer.serverSide
Class ServerPaths
- java.lang.Object
-
- jetbrains.buildServer.serverSide.ServerPaths
-
- All Implemented Interfaces:
CachePaths
public class ServerPaths extends Object implements CachePaths
Provides information about TeamCity server working paths locations.
-
-
Field Summary
Fields Modifier and Type Field Description static String
CACHES_DIRECTORY_NAME
static String
GLOBAL_ARTIFACTS_DIRECTORY_NAME
static String
ourBackupFolderName
static String
ourBuildLogSubfolderName
Name of the obsolete folder with build logs, inside the system folder.static String
ourConfigFolderName
static String
ourLibFolderName
static String
ourPersonalChangesSubfolderName
Name of the folder with personal changes, inside the system folder.static String
ourPluginsFolderName
static String
ourSystemFolderName
static String
outImportFolderName
static String
PLUGIN_DATA_DIRECTORY_NAME
static String
PROJECTS_DIR_NAME
static String
SYSTEM_DIRECTORY_NAME
-
Constructor Summary
Constructors Constructor Description ServerPaths(File rootDir)
Creates an instance of ServerPath.ServerPaths(String rootDir)
Creates an instance of ServerPath.ServerPaths(String systemDir, String configDir, String backupDir, String importDir)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description File
getArtifactsDirectory()
String
getBackupDir()
Directory for backup TeamCity data.File
getCacheDirectory(String name)
Returns a directory to store cachesString
getCachesDir()
Returns path to the TeamCity caches directory.String
getConfigDir()
Returns path to the TeamCity configuration directory.File
getDataDirectory()
Returns TeamCity data directory (root for all of the configuration directories).String
getImportDir()
Directory containing archives that can be used to import projects.String
getLibDir()
File
getLogsPath()
Returns path to logs dir.File
getPluginDataDirectory()
Returns TeamCity plugins data directory (root for all of the plugins).String
getPluginsDir()
File
getProjectsDir()
String
getSystemDir()
Returns path to the TeamCity system directory.boolean
isCustomCachesDir()
void
setCachesDir(String cachesDir)
-
-
-
Field Detail
-
GLOBAL_ARTIFACTS_DIRECTORY_NAME
public static final String GLOBAL_ARTIFACTS_DIRECTORY_NAME
- See Also:
- Constant Field Values
-
SYSTEM_DIRECTORY_NAME
public static final String SYSTEM_DIRECTORY_NAME
- See Also:
- Constant Field Values
-
PLUGIN_DATA_DIRECTORY_NAME
public static final String PLUGIN_DATA_DIRECTORY_NAME
- See Also:
- Constant Field Values
-
CACHES_DIRECTORY_NAME
public static final String CACHES_DIRECTORY_NAME
- See Also:
- Constant Field Values
-
PROJECTS_DIR_NAME
public static final String PROJECTS_DIR_NAME
- See Also:
- Constant Field Values
-
ourSystemFolderName
public static final String ourSystemFolderName
- See Also:
- Constant Field Values
-
ourConfigFolderName
public static final String ourConfigFolderName
- See Also:
- Constant Field Values
-
ourBackupFolderName
public static final String ourBackupFolderName
- See Also:
- Constant Field Values
-
outImportFolderName
public static final String outImportFolderName
- See Also:
- Constant Field Values
-
ourLibFolderName
public static final String ourLibFolderName
- See Also:
- Constant Field Values
-
ourPluginsFolderName
public static final String ourPluginsFolderName
- See Also:
- Constant Field Values
-
ourBuildLogSubfolderName
public static final String ourBuildLogSubfolderName
Name of the obsolete folder with build logs, inside the system folder.- See Also:
- Constant Field Values
-
ourPersonalChangesSubfolderName
public static final String ourPersonalChangesSubfolderName
Name of the folder with personal changes, inside the system folder.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ServerPaths
public ServerPaths(String systemDir, String configDir, String backupDir, String importDir)
-
ServerPaths
public ServerPaths(@NotNull String rootDir)
Creates an instance of ServerPath.- Parameters:
rootDir
- the TeamCity Data Directory.- See Also:
ServerPaths(File)
-
ServerPaths
public ServerPaths(@NotNull File rootDir)
Creates an instance of ServerPath.- Parameters:
rootDir
- the TeamCity Data Directory.- Since:
- 9.1
- See Also:
ServerPaths(String)
-
-
Method Detail
-
setCachesDir
public void setCachesDir(@Nullable String cachesDir)
-
isCustomCachesDir
public boolean isCustomCachesDir()
- Returns:
- true if custom caches directory was specified
- Since:
- 2020.1.1
-
getLogsPath
@NotNull public File getLogsPath()
Returns path to logs dir. In some cases logs dir may be changes by reconfiguring log4j.- Returns:
- path to logs folder is it exists on null
-
getSystemDir
public String getSystemDir()
Returns path to the TeamCity system directory. This directory contains build logs, artifacts, HSQLDB database files, and other non-configuration stuff. Usually, this is TEAMCITY_DATA_PATH/system, where TEAMCITY_DATA_PATH is specified as system property teamcity.data.path or environment variable TEAMCITY_DATA_PATH or $HOME/.BuildServer- Returns:
- TeamCity system directory
-
getCachesDir
public String getCachesDir()
Returns path to the TeamCity caches directory. Could be used to store caches for plugins or core services.- Returns:
- TeamCity caches directory
-
getCacheDirectory
@NotNull public File getCacheDirectory(@NotNull String name)
Returns a directory to store caches- Specified by:
getCacheDirectory
in interfaceCachePaths
- Parameters:
name
- name of cache- Returns:
- existing directory to store caches
- Since:
- 8.0
-
getConfigDir
public String getConfigDir()
Returns path to the TeamCity configuration directory. This directory contains various settings of TeamCity, including description of projects, build configurations, and other settings. Usually, this is TEAMCITY_DATA_PATH/config, where TEAMCITY_DATA_PATH is specified as system property teamcity.data.path or environment variable TEAMCITY_DATA_PATH or $HOME/.BuildServer- Returns:
- TeamCity configuration directory
-
getBackupDir
public String getBackupDir()
Directory for backup TeamCity data.- Returns:
- TeamCity backup directory.
-
getImportDir
public String getImportDir()
Directory containing archives that can be used to import projects.- Since:
- 9.0
-
getProjectsDir
@NotNull public File getProjectsDir()
- Returns:
- server projects directory path
- Since:
- 8.0
-
getArtifactsDirectory
@NotNull public File getArtifactsDirectory()
- Returns:
- default artifacts directory. Since 9.1 this method is only used to obtain default artifacts directory if no other directories are specified. To get all configured artifact directories, use jetbrains.buildServer.serverSide.ServerSettings#getArtifactDirectories() method
-
getPluginDataDirectory
@NotNull public File getPluginDataDirectory()
Returns TeamCity plugins data directory (root for all of the plugins).
-
getDataDirectory
@NotNull public File getDataDirectory()
Returns TeamCity data directory (root for all of the configuration directories).- Returns:
- TeamCity data directory
-
getLibDir
public String getLibDir()
-
getPluginsDir
public String getPluginsDir()
-
-