KeepRule

class KeepRule

Specifies a keep rule. A keep rule defines what particular data to preserve during the clean-up. Multiple keep rules can be assigned to a project or build configuration.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
interface DataToKeep

Represents dataToKeep

Link copied to clipboard
class DaysLimit

Configures KeepAtLeast which keeps builds based on their age

Link copied to clipboard

Holds configuration of history and statistics dataToKeep

Link copied to clipboard

Holds the range limit for this keep rule

Link copied to clipboard

Holds all the filters used to pick out the builds this keep rule will preserve

Link copied to clipboard
class PreserveArtifacts(val patterns: String)

Holds the artifacts pattern to keep

Properties

Link copied to clipboard

If set to true then the keepAtLeast will be applied to each branch selected by the branch filter (or to each branch in the configuration if no branch filter is specified) separately. applyPerEachBranch could be used to enable.

Link copied to clipboard

Specifies what data should be kept in builds preserved by this keep rule

Link copied to clipboard

Disables this rule

Link copied to clipboard
var id: String?

ID of this keep rule. Every keep rule must have an ID unique to the current project/build configuration. Any sequence of letters, digits and '_' signs is allowed. It's recommended to use human-readable IDs expressing the origin of the rule: e.g. 'keepAllReleases' or 'keepHistory'.

Link copied to clipboard

Defines the limit for this keep rule. allBuilds will be used if not specified

Link copied to clipboard

If set to true and if this build configuration uses any artifact dependencies, then this keep rule will prevent deleting builds in build configurations where the artifact dependencies are used from.

Functions

Link copied to clipboard

Specifies that all artifacts should be kept in this HistoryAndStatistics

Link copied to clipboard

Specifies that only artifacts should be kept in builds preserved by this keep rule. History and statistics will be automatically preserved, logs will be removed (if no other keep rule specifies keeping them).

Link copied to clipboard
fun allBuilds(): <Error class: unknown class>

Specifies that this keep rule will preserve all builds matched by the selected filters

Link copied to clipboard

If used, then keepAtLeast will be applied to each branch selected by the branch filter (or to each branch in the configuration if no branch filter is specified) separately.

Link copied to clipboard

Allows specifying filters to pick out the builds this keep rule will preserve

Link copied to clipboard

Specifies that only artifacts matched by patterns should be kept in builds preserved by this keep rule. History and statistics will be automatically preserved, logs will be removed (if no other keep rule specifies keeping them).

Link copied to clipboard
Link copied to clipboard

Constructs the keepAtLeast from raw parameters

Link copied to clipboard
fun builds(n: Int): <Error class: unknown class>

Specifies that this keep rule will preserve all builds matched by the selected filters up to the nth build

Link copied to clipboard

Specifies that all artifacts matched by patterns should be kept in this HistoryAndStatistics

Link copied to clipboard
fun days(n: Int): <Error class: unknown class>

Specifies that this keep rule will preserve all builds matched by the selected filters up to the nth day since the current day

Specifies that this keep rule will preserve all builds matched by the selected filters up to the nth day. Allows specifying the policy to select the limiting day in the DaysLimit.since field.

Link copied to clipboard

Specifies that everything should be kept in builds preserved by this keep rule

Link copied to clipboard

Specifies that only history and statistics should be kept in builds preserved by this keep rule. Logs and artifacts will be removed (if no other keep rule specifies keeping them).

Specifies that history and statistics should be kept in builds preserved by this keep rule and allows to select which parts of build results (e.g. logs, artifacts) should also be kept.

Link copied to clipboard

Specifies that only logs should be kept in builds preserved by this keep rule. History and statistics will be automatically preserved, artifacts will be removed (if no other keep rule specifies keeping them).

Link copied to clipboard
fun param(name: String, value: String?)
Link copied to clipboard

Specifies that only statistics should be kept in builds preserved by this keep rule. Builds won't be visible in the build history, logs and artifacts will be removed (if no other keep rule specifies keeping them).