Interface BuildCleanupContext
-
- All Superinterfaces:
CleanupContext
public interface BuildCleanupContext extends CleanupContext
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default java.util.List<java.lang.Long>
getBuildIds()
Returns ids of builds to be cleaned on given cleanup level.java.util.List<SFinishedBuild>
getBuilds()
Returns list of builds to be cleaned on given cleanup level if such builds still exist.CleanupLevel
getCleanupLevel()
CleanupPolicy
getCleanupPolicyForBuild(long buildId)
Deprecated.since 2019.2: always returns the cleanup policy with "do not clean anything" artifacts pattern.ErrorReporter
getErrorReporter()
Deprecated.void
onBuildCleanupError(BuildsCleanupExtension cleanupExtension, SBuild build, java.lang.String errorMessage)
Informs the core clean-up process about an error happened in a clean-up extension.
Note: if there are a lot of such calls, try to keep the sameerrorMessage
when possible: it will allow to provide the resulting health report in a more compact format.-
Methods inherited from interface jetbrains.buildServer.serverSide.cleanup.CleanupContext
getCleanupState
-
-
-
-
Method Detail
-
getCleanupLevel
@NotNull CleanupLevel getCleanupLevel()
- Returns:
- current cleanup level
-
getCleanupPolicyForBuild
@NotNull @Deprecated CleanupPolicy getCleanupPolicyForBuild(long buildId)
Deprecated.since 2019.2: always returns the cleanup policy with "do not clean anything" artifacts pattern.This method is intended for TeamCity internal usage only and can be changed, removed or throw an exception at any time!
Always returns the cleanup policy with "do not clean anything" artifacts pattern.- Parameters:
buildId
- id of the build- Since:
- 2017.1.1
-
getBuilds
@NotNull java.util.List<SFinishedBuild> getBuilds()
Returns list of builds to be cleaned on given cleanup level if such builds still exist.
-
getBuildIds
@NotNull default java.util.List<java.lang.Long> getBuildIds()
Returns ids of builds to be cleaned on given cleanup level.
-
getErrorReporter
@NotNull @Deprecated ErrorReporter getErrorReporter()
Deprecated.- Returns:
- error reporter which can be used if errors occur during the cleanup.
-
onBuildCleanupError
void onBuildCleanupError(@NotNull BuildsCleanupExtension cleanupExtension, @NotNull SBuild build, @NotNull java.lang.String errorMessage)
Informs the core clean-up process about an error happened in a clean-up extension.
Note: if there are a lot of such calls, try to keep the sameerrorMessage
when possible: it will allow to provide the resulting health report in a more compact format.- Parameters:
cleanupExtension
- the affected clean-up extensionbuild
- the affected builderrorMessage
- the error description- Since:
- 2020.2.3
-
-