Interface CiState
@Immutable
public interface CiState
Contains state about the current build on a CI if it is running on CI.
-
Method Summary
Modifier and Type Method Description static CiStatecreateAndAdd(org.gradle.api.Project project)java.lang.StringgetBranch()Returns the branch for this build if it is on CI or empty otherwise.java.lang.StringgetRevisionId()Returns the revision ID for this build (e.g., git commit) if it is on CI, or empty otherwise.java.util.List<java.lang.String>getRevisionTags()Returns tags to associate with this build, usually used when tagging docker images for deployment.booleanisCi()Returns whether this build is happening on CI or mimics the behavior of CI.booleanisLocalBuild()Returns whether this is a local build on a developer's machine.booleanisMasterBuild()Returns whether this is a master build on CI.booleanisReleaseBuild()Returns whether this is a release build on CI.
-
Method Details
-
createAndAdd
-
isCi
boolean isCi()Returns whether this build is happening on CI or mimics the behavior of CI. -
isMasterBuild
boolean isMasterBuild()Returns whether this is a master build on CI. -
isReleaseBuild
boolean isReleaseBuild()Returns whether this is a release build on CI. -
isLocalBuild
boolean isLocalBuild()Returns whether this is a local build on a developer's machine. This is true even if it is mimicing the behavior of CI locally. -
getRevisionId
java.lang.String getRevisionId()Returns the revision ID for this build (e.g., git commit) if it is on CI, or empty otherwise. -
getBranch
java.lang.String getBranch()Returns the branch for this build if it is on CI or empty otherwise. -
getRevisionTags
java.util.List<java.lang.String> getRevisionTags()Returns tags to associate with this build, usually used when tagging docker images for deployment.
-