public enum VcsProperties extends Enum<VcsProperties> implements CiOption
| Enum Constant and Description |
|---|
GIT_COMMIT_ID
`git rev-parse HEAD`.
|
GIT_REF_NAME
Auto detect current build ref name by CI environment variables or local git info.
|
GIT_REMOTE_ORIGIN_URL |
| Modifier and Type | Method and Description |
|---|---|
Optional<String> |
getDefaultValue() |
String |
getPropertyName() |
static Optional<String> |
gitRepoSlug(CiOptionContext ciOptionContext)
Get slug info of current repository (directory).
|
static boolean |
isReleaseRef(String gitRef) |
static boolean |
isSnapshotRef(String gitRef) |
static VcsProperties |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static VcsProperties[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfcalculateValue, findInProperties, getEnvVariableName, getSystemPropertyName, getValue, name, setPropertiespublic static final VcsProperties GIT_COMMIT_ID
public static final VcsProperties GIT_REF_NAME
travis-ci
TRAVIS_BRANCH for travis-ci, see: https://docs.travis-ci.com/user/environment-variables/
for builds triggered by a tag, this is the same as the name of the tag (TRAVIS_TAG).
appveyor
APPVEYOR_REPO_BRANCH - build branch. For Pull Request commits it is base branch PR is merging into
APPVEYOR_REPO_TAG - true if build has started by pushed tag; otherwise false
APPVEYOR_REPO_TAG_NAME - contains tag name for builds started by tag; otherwise this variable is
public static final VcsProperties GIT_REMOTE_ORIGIN_URL
public static VcsProperties[] values()
for (VcsProperties c : VcsProperties.values()) System.out.println(c);
public static VcsProperties valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static boolean isSnapshotRef(String gitRef)
public static boolean isReleaseRef(String gitRef)
public static Optional<String> gitRepoSlug(CiOptionContext ciOptionContext)
ciOptionContext - ciOptionContextpublic Optional<String> getDefaultValue()
getDefaultValue in interface CiOptionpublic String getPropertyName()
getPropertyName in interface CiOptionCopyright © 2019. All rights reserved.