Package jetbrains.buildServer.artifacts
Class RevisionRules
- java.lang.Object
-
- jetbrains.buildServer.artifacts.RevisionRules
-
public class RevisionRules extends java.lang.Object
Revision rules factory.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RevisionRules.AbstractRevisionRule
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
BRANCH_ATTR
static java.lang.String
BUILD_ID_NAME
static java.lang.String
BUILD_ID_SUFFIX
static java.lang.String
BUILD_NUMBER_NAME
static java.lang.String
BUILD_TAG_NAME
static java.lang.String
BUILD_TAG_SUFFIX
static java.lang.String
LAST_FINISHED_NAME
static RevisionRule
LAST_FINISHED_RULE
Rule for last finished build artifacts selectionstatic java.lang.String
LAST_FINISHED_SAME_CHAIN_NAME
static RevisionRule
LAST_FINISHED_SAME_CHAIN_RULE
Rule for last finished build from the same build chainstatic java.lang.String
LAST_PINNED_NAME
static RevisionRule
LAST_PINNED_RULE
Rule for last pinned build artifacts selectionstatic java.lang.String
LAST_SUCCESSFUL_NAME
static RevisionRule
LAST_SUCCESSFUL_RULE
Rule for last successful build artifacts selectionstatic java.lang.String
NAME_ATTR
static java.lang.String
REVISION_ATTR
static java.lang.String
REVISION_RULE_TAG
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Long
extractBuildIdFromRule(RevisionRule rule)
Extracts build id from rule.static RevisionRule
newBranchRevisionRule(java.lang.String revision, java.lang.String branch)
Attempts to create revision rule object by specified revision and branch.static RevisionRule
newBranchRevisionRule(java.lang.String name, java.lang.String value, java.lang.String branch)
Returns new revision rule from given name, value and branch.static RevisionRule
newBuildIdRule(long buildId, java.lang.String buildNumber)
Creates new revision rule for build idstatic RevisionRule
newBuildNumberRule(java.lang.String buildNumber)
Creates revision rule that will select build artifacts using build number pattern.static RevisionRule
newBuildTagRule(java.lang.String buildTagParam)
static RevisionRule
newBuildTagRule(java.lang.String buildTagParam, java.lang.String branch)
Returns a build tag rule for given tag and branchstatic RevisionRule
newRevisionRule(java.lang.String revision)
Attempts to create revision rule object by specified revision only.static RevisionRule
newRevisionRule(java.lang.String name, java.lang.String value)
Creates new revision rule from given name and value.
-
-
-
Field Detail
-
REVISION_RULE_TAG
@NonNls public static final java.lang.String REVISION_RULE_TAG
- See Also:
- Constant Field Values
-
NAME_ATTR
@NonNls public static final java.lang.String NAME_ATTR
- See Also:
- Constant Field Values
-
REVISION_ATTR
@NonNls public static final java.lang.String REVISION_ATTR
- See Also:
- Constant Field Values
-
BRANCH_ATTR
@NonNls public static final java.lang.String BRANCH_ATTR
- See Also:
- Constant Field Values
-
BUILD_ID_SUFFIX
public static final java.lang.String BUILD_ID_SUFFIX
- See Also:
- Constant Field Values
-
BUILD_TAG_SUFFIX
public static final java.lang.String BUILD_TAG_SUFFIX
- See Also:
- Constant Field Values
-
LAST_PINNED_NAME
public static final java.lang.String LAST_PINNED_NAME
- See Also:
- Constant Field Values
-
LAST_SUCCESSFUL_NAME
public static final java.lang.String LAST_SUCCESSFUL_NAME
- See Also:
- Constant Field Values
-
LAST_FINISHED_NAME
public static final java.lang.String LAST_FINISHED_NAME
- See Also:
- Constant Field Values
-
LAST_FINISHED_SAME_CHAIN_NAME
public static final java.lang.String LAST_FINISHED_SAME_CHAIN_NAME
- See Also:
- Constant Field Values
-
BUILD_NUMBER_NAME
public static final java.lang.String BUILD_NUMBER_NAME
- See Also:
- Constant Field Values
-
BUILD_ID_NAME
public static final java.lang.String BUILD_ID_NAME
- See Also:
- Constant Field Values
-
BUILD_TAG_NAME
public static final java.lang.String BUILD_TAG_NAME
- See Also:
- Constant Field Values
-
LAST_PINNED_RULE
@NotNull public static final RevisionRule LAST_PINNED_RULE
Rule for last pinned build artifacts selection
-
LAST_SUCCESSFUL_RULE
@NotNull public static final RevisionRule LAST_SUCCESSFUL_RULE
Rule for last successful build artifacts selection
-
LAST_FINISHED_RULE
@NotNull public static final RevisionRule LAST_FINISHED_RULE
Rule for last finished build artifacts selection
-
LAST_FINISHED_SAME_CHAIN_RULE
@NotNull public static final RevisionRule LAST_FINISHED_SAME_CHAIN_RULE
Rule for last finished build from the same build chain
-
-
Method Detail
-
newBuildNumberRule
@NotNull public static RevisionRule newBuildNumberRule(@NotNull java.lang.String buildNumber)
Creates revision rule that will select build artifacts using build number pattern.- Parameters:
buildNumber
- build number- Returns:
- new build number revision rule
-
newBuildTagRule
@NotNull public static RevisionRule newBuildTagRule(@Nullable java.lang.String buildTagParam)
-
newBuildTagRule
public static RevisionRule newBuildTagRule(@Nullable java.lang.String buildTagParam, @Nullable java.lang.String branch)
Returns a build tag rule for given tag and branch- Parameters:
buildTagParam
- build tagbranch
- branch- Returns:
- see above
-
newBuildIdRule
@NotNull public static RevisionRule newBuildIdRule(long buildId, @Nullable java.lang.String buildNumber)
Creates new revision rule for build id- Parameters:
buildId
- build id- Returns:
- see above
- Since:
- 6.0
-
extractBuildIdFromRule
@NotNull public static java.lang.Long extractBuildIdFromRule(RevisionRule rule)
Extracts build id from rule.- Parameters:
rule
- build id rule.- Returns:
- build id
- Throws:
java.lang.IllegalArgumentException
- if rule revision can not be transformed to build id.
-
newRevisionRule
@NotNull public static RevisionRule newRevisionRule(@NotNull java.lang.String name, @Nullable java.lang.String value)
Creates new revision rule from given name and value. Value is ignored for all rules except build number rule.- Parameters:
name
- name of the rulevalue
- additional value of the rule- Returns:
- new revision rule
-
newBranchRevisionRule
@NotNull public static RevisionRule newBranchRevisionRule(@NotNull java.lang.String name, @Nullable java.lang.String value, @Nullable java.lang.String branch)
Returns new revision rule from given name, value and branch. Value and branch used only in rules that support them.- Parameters:
name
- name of the rulevalue
- additional value of the rulebranch
- branch- Returns:
- see above
-
newRevisionRule
@Nullable public static RevisionRule newRevisionRule(@NotNull java.lang.String revision)
Attempts to create revision rule object by specified revision only.- Parameters:
revision
- revision- Returns:
- see above
- Since:
- 6.0
-
newBranchRevisionRule
@Nullable public static RevisionRule newBranchRevisionRule(@NotNull java.lang.String revision, @Nullable java.lang.String branch)
Attempts to create revision rule object by specified revision and branch.- Parameters:
revision
- revisionbranch
- branch- Returns:
- see above
- Since:
- 8.0
-
-