Package jetbrains.buildServer.artifacts
Class RevisionRules
- java.lang.Object
-
- jetbrains.buildServer.artifacts.RevisionRules
-
public class RevisionRules extends Object
Revision rules factory.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRevisionRules.AbstractRevisionRule
-
Field Summary
Fields Modifier and Type Field Description static StringBRANCH_ATTRstatic StringBUILD_ID_NAMEstatic StringBUILD_ID_SUFFIXstatic StringBUILD_NUMBER_NAMEstatic StringBUILD_TAG_NAMEstatic StringBUILD_TAG_SUFFIXstatic StringLAST_FINISHED_NAMEstatic RevisionRuleLAST_FINISHED_RULERule for last finished build artifacts selectionstatic StringLAST_FINISHED_SAME_CHAIN_NAMEstatic RevisionRuleLAST_FINISHED_SAME_CHAIN_RULERule for last finished build from the same build chainstatic StringLAST_PINNED_NAMEstatic RevisionRuleLAST_PINNED_RULERule for last pinned build artifacts selectionstatic StringLAST_SUCCESSFUL_NAMEstatic RevisionRuleLAST_SUCCESSFUL_RULERule for last successful build artifacts selectionstatic StringNAME_ATTRstatic StringREVISION_ATTRstatic StringREVISION_RULE_TAG
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static LongextractBuildIdFromRule(RevisionRule rule)Extracts build id from rule.static RevisionRulenewBranchRevisionRule(String revision, String branch)Attempts to create revision rule object by specified revision and branch.static RevisionRulenewBranchRevisionRule(String name, String value, String branch)Returns new revision rule from given name, value and branch.static RevisionRulenewBuildIdRule(long buildId, String buildNumber)Creates new revision rule for build idstatic RevisionRulenewBuildNumberRule(String buildNumber)Creates revision rule that will select build artifacts using build number pattern.static RevisionRulenewBuildTagRule(String buildTagParam)static RevisionRulenewBuildTagRule(String buildTagParam, String branch)Returns a build tag rule for given tag and branchstatic RevisionRulenewRevisionRule(String revision)Attempts to create revision rule object by specified revision only.static RevisionRulenewRevisionRule(String name, String value)Creates new revision rule from given name and value.
-
-
-
Field Detail
-
REVISION_RULE_TAG
@NonNls public static final String REVISION_RULE_TAG
- See Also:
- Constant Field Values
-
NAME_ATTR
@NonNls public static final String NAME_ATTR
- See Also:
- Constant Field Values
-
REVISION_ATTR
@NonNls public static final String REVISION_ATTR
- See Also:
- Constant Field Values
-
BRANCH_ATTR
@NonNls public static final String BRANCH_ATTR
- See Also:
- Constant Field Values
-
BUILD_ID_SUFFIX
public static final String BUILD_ID_SUFFIX
- See Also:
- Constant Field Values
-
BUILD_TAG_SUFFIX
public static final String BUILD_TAG_SUFFIX
- See Also:
- Constant Field Values
-
LAST_PINNED_NAME
public static final String LAST_PINNED_NAME
- See Also:
- Constant Field Values
-
LAST_SUCCESSFUL_NAME
public static final String LAST_SUCCESSFUL_NAME
- See Also:
- Constant Field Values
-
LAST_FINISHED_NAME
public static final String LAST_FINISHED_NAME
- See Also:
- Constant Field Values
-
LAST_FINISHED_SAME_CHAIN_NAME
public static final String LAST_FINISHED_SAME_CHAIN_NAME
- See Also:
- Constant Field Values
-
BUILD_NUMBER_NAME
public static final String BUILD_NUMBER_NAME
- See Also:
- Constant Field Values
-
BUILD_ID_NAME
public static final String BUILD_ID_NAME
- See Also:
- Constant Field Values
-
BUILD_TAG_NAME
public static final 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 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 String buildTagParam)
-
newBuildTagRule
public static RevisionRule newBuildTagRule(@Nullable String buildTagParam, @Nullable 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 String buildNumber)
Creates new revision rule for build id- Parameters:
buildId- build id- Returns:
- see above
- Since:
- 6.0
-
extractBuildIdFromRule
@NotNull public static Long extractBuildIdFromRule(RevisionRule rule)
Extracts build id from rule.- Parameters:
rule- build id rule.- Returns:
- build id
- Throws:
IllegalArgumentException- if rule revision can not be transformed to build id.
-
newRevisionRule
@NotNull public static RevisionRule newRevisionRule(@NotNull String name, @Nullable 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 String name, @Nullable String value, @Nullable 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 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 String revision, @Nullable String branch)
Attempts to create revision rule object by specified revision and branch.- Parameters:
revision- revisionbranch- branch- Returns:
- see above
- Since:
- 8.0
-
-