public class RevisionRules
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
RevisionRules.AbstractRevisionRule |
Modifier and Type | Field and 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 selection
|
static java.lang.String |
LAST_FINISHED_SAME_CHAIN_NAME |
static RevisionRule |
LAST_FINISHED_SAME_CHAIN_RULE
Rule for last finished build from the same build chain
|
static java.lang.String |
LAST_PINNED_NAME |
static RevisionRule |
LAST_PINNED_RULE
Rule for last pinned build artifacts selection
|
static java.lang.String |
LAST_SUCCESSFUL_NAME |
static RevisionRule |
LAST_SUCCESSFUL_RULE
Rule for last successful build artifacts selection
|
static java.lang.String |
NAME_ATTR |
static java.lang.String |
REVISION_ATTR |
static java.lang.String |
REVISION_RULE_TAG |
Modifier and Type | Method and 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 id
|
static 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 branch
|
static 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.
|
@NonNls public static final java.lang.String REVISION_RULE_TAG
@NonNls public static final java.lang.String NAME_ATTR
@NonNls public static final java.lang.String REVISION_ATTR
@NonNls public static final java.lang.String BRANCH_ATTR
public static final java.lang.String BUILD_ID_SUFFIX
public static final java.lang.String BUILD_TAG_SUFFIX
public static final java.lang.String LAST_PINNED_NAME
public static final java.lang.String LAST_SUCCESSFUL_NAME
public static final java.lang.String LAST_FINISHED_NAME
public static final java.lang.String LAST_FINISHED_SAME_CHAIN_NAME
public static final java.lang.String BUILD_NUMBER_NAME
public static final java.lang.String BUILD_ID_NAME
public static final java.lang.String BUILD_TAG_NAME
@NotNull public static final RevisionRule LAST_PINNED_RULE
@NotNull public static final RevisionRule LAST_SUCCESSFUL_RULE
@NotNull public static final RevisionRule LAST_FINISHED_RULE
@NotNull public static final RevisionRule LAST_FINISHED_SAME_CHAIN_RULE
@NotNull public static RevisionRule newBuildNumberRule(@NotNull java.lang.String buildNumber)
buildNumber
- build number@NotNull public static RevisionRule newBuildTagRule(@Nullable java.lang.String buildTagParam)
public static RevisionRule newBuildTagRule(@Nullable java.lang.String buildTagParam, @Nullable java.lang.String branch)
buildTagParam
- build tagbranch
- branch@NotNull public static RevisionRule newBuildIdRule(long buildId, @Nullable java.lang.String buildNumber)
buildId
- build id@NotNull public static java.lang.Long extractBuildIdFromRule(RevisionRule rule)
rule
- build id rule.java.lang.IllegalArgumentException
- if rule revision can not be transformed to build id.@NotNull public static RevisionRule newRevisionRule(@NotNull java.lang.String name, @Nullable java.lang.String value)
name
- name of the rulevalue
- additional value of the rule@NotNull public static RevisionRule newBranchRevisionRule(@NotNull java.lang.String name, @Nullable java.lang.String value, @Nullable java.lang.String branch)
name
- name of the rulevalue
- additional value of the rulebranch
- branch@Nullable public static RevisionRule newRevisionRule(@NotNull java.lang.String revision)
revision
- revision@Nullable public static RevisionRule newBranchRevisionRule(@NotNull java.lang.String revision, @Nullable java.lang.String branch)
revision
- revisionbranch
- branch