Package com.atlassian.bamboo.storage
Interface StorageLocationService
- All Known Implementing Classes:
StorageLocationServiceImpl
public interface StorageLocationService
Methods for determining the storage location of various types of persistent data related to builds and deployments,
such as artifacts, logs and build results.
-
Method Summary
Modifier and TypeMethodDescriptiongetArtifactDirectoryBuilder
(File rootArtifactDirectory) Returns an ArtifactDirectoryBuilder which can be used to buildFile
objects pointing to artifacts stored on the local filesystem.getArtifactPathBuilder
(char separatorChar) Returns an ArtifactPathBuilder which can be used to construct paths to stored artifacts.getArtifactPathBuilder
(String rootArtifactPath, char separatorChar) Returns an ArtifactPathBuilder which can be used to construct paths to stored artifacts.getBuildDataDirectory
(Key key) Returns the top level build data directory for a plan or deployment project.Returns the "download data" directory for a plan or deployment project.getBuildLogsDirectory
(Key key) Eg.getBuildResultsDirectory
(Key buildKey) Eg.Returns the default ArtifactDirectoryBuilder which can be used to buildFile
objects pointing to artifacts stored on the local filesystem in the default location.getLogFile
(@NotNull ResultKey resultKey, @Nullable String suffix) Returns the location of the log file for the specified build or deployment.getLogFile
(Key entityKey, int resultNumber) Deprecated.getLogFile
(Key entityKey, long resultNumber) Returns the location of the log file for the specified build or deployment.getLogFile
(ResultKey resultKey) Returns the location of the log file for the specified build or deployment.getLogFileName
(@NotNull Key entityKey, int resultNumber) Deprecated.since 6.5 usegetLogFileName(Key, long)
getLogFileName
(@NotNull Key entityKey, long resultNumber) Returns the standard name of the log file for the specified build or deployment.getLogFileName
(ResultKey resultKey) Returns the standard name of the log file for the specified build or deployment.getLogsFileNames
(@NotNull ResultKey resultKey) Return all log filenames sorted by age (newest first).getOldLogsFileNames
(@NotNull ResultKey resultKey) If a result has logs from previous runs, return their filenames sorted by age (newest first).Returns the root build data directory for all plans and deployment projects.void
renameOldBuildLogsIfNeeded
(@NotNull ResultKey resultKey) Makes sure that build log file for the current result is empty, by renaming any pre-existing build logs.
-
Method Details
-
getRootBuildDataDirectory
File getRootBuildDataDirectory()Returns the root build data directory for all plans and deployment projects. -
getBuildDataDirectory
Returns the top level build data directory for a plan or deployment project. This is the common parent directory for storing build and deployment metadata related to the plan or project. Build results and logs are stored in subdirectories under this directory. Eg. ".../xml-data/builds/plan-12345-JOB1/" -
getBuildResultsDirectory
Eg. ".../xml-data/builds/plan-12345-JOB1/results/" -
getBuildDownloadDataDirectory
Returns the "download data" directory for a plan or deployment project. Eg. ".../xml-data/builds/plan-12345-JOB1/download-data/" -
getBuildLogsDirectory
Eg. ".../xml-data/builds/plan-12345-JOB1/download-data/build_logs/" -
getLogFileName
Deprecated.since 6.5 usegetLogFileName(Key, long)
Returns the standard name of the log file for the specified build or deployment. -
getLogFileName
Returns the standard name of the log file for the specified build or deployment. -
getLogFileName
Returns the standard name of the log file for the specified build or deployment. -
getLogFile
Deprecated.since 6.5 usegetLogFile(Key, long)
Returns the location of the log file for the specified build or deployment. -
getLogFile
Returns the location of the log file for the specified build or deployment. -
getLogFile
Returns the location of the log file for the specified build or deployment. -
getLogFile
Returns the location of the log file for the specified build or deployment. Optional suffix parameter allows getting logs from previous runs.- Since:
- 7.2
-
getArtifactPathBuilder
Returns an ArtifactPathBuilder which can be used to construct paths to stored artifacts. This version of the method takes a rootArtifactPath parameter, returning an instance that builds absolute paths. -
getArtifactPathBuilder
Returns an ArtifactPathBuilder which can be used to construct paths to stored artifacts. This version of the method returns an instance that builds relative paths, not absolute paths. All the paths produced by this builder must be appended to a root artifact storage location before being used to locate artifacts. -
getArtifactDirectoryBuilder
Returns an ArtifactDirectoryBuilder which can be used to buildFile
objects pointing to artifacts stored on the local filesystem. This version of the method takes a rootArtifactDirectory parameter. -
getDefaultArtifactDirectoryBuilder
ArtifactDirectoryBuilder getDefaultArtifactDirectoryBuilder()Returns the default ArtifactDirectoryBuilder which can be used to buildFile
objects pointing to artifacts stored on the local filesystem in the default location. This method is only available to code running on the server, not on remote agents (remote agents never store artifacts on the local filesystem). -
renameOldBuildLogsIfNeeded
Makes sure that build log file for the current result is empty, by renaming any pre-existing build logs.- Since:
- 7.2
-
getOldLogsFileNames
If a result has logs from previous runs, return their filenames sorted by age (newest first). See alsorenameOldBuildLogsIfNeeded(ResultKey)
- Since:
- 7.2
-
getLogsFileNames
Return all log filenames sorted by age (newest first).- Since:
- 7.2
-
getLogFile(Key, long)