Class GitHubRepository
- java.lang.Object
-
- com.atlassian.bamboo.specs.api.builders.EntityPropertiesBuilder<T>
-
- com.atlassian.bamboo.specs.api.builders.RootEntityPropertiesBuilder<E>
-
- com.atlassian.bamboo.specs.api.builders.repository.VcsRepository<GitHubRepository,GitHubRepositoryProperties>
-
- com.atlassian.bamboo.specs.builders.repository.github.GitHubRepository
-
public class GitHubRepository extends VcsRepository<GitHubRepository,GitHubRepositoryProperties>
GitHub repository.
-
-
Field Summary
-
Fields inherited from class com.atlassian.bamboo.specs.api.builders.repository.VcsRepository
description, name, oid, parent, project, repositoryViewer, TYPE
-
-
Constructor Summary
Constructors Constructor Description GitHubRepository()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GitHubRepositoryauthentication(@NotNull UserPasswordAuthentication userPasswordAuthentication)Specifies username/access token authentication.GitHubRepositorybaseUrl(java.lang.String baseUrl)Checks base Url.GitHubRepositorybranch(@NotNull java.lang.String branch)Sets branch to check out.protected GitHubRepositoryPropertiesbuild()GitHubRepositorychangeDetection(@NotNull VcsChangeDetection vcsChangeDetection)Sets change detection options for this repository.GitHubRepositorycommandTimeout(java.time.Duration commandTimeout)Specifies how much time is given for git commands to finish.GitHubRepositorycommandTimeoutInMinutes(int commandTimeoutMinutes)Specifies how much time in minutes is given for git commands to finish.GitHubRepositorydefaultChangeDetection()Resets all change detection options to defaults.GitHubRepositoryfetchWholeRepository(boolean fetchWholeRepository)Enforces (or not) fetching all remote refs from the repository rather than single branch.GitHubRepositorylfsEnabled(boolean useLfs)Enables/disables git lfs support.GitHubRepositoryremoteAgentCacheEnabled(boolean useRemoteAgentCache)Enables/disables caching repository content on the remote and elastic agents.GitHubRepositoryrepository(@NotNull java.lang.String repository)Sets gitHub repository name.GitHubRepositoryshallowClonesEnabled(boolean useShallowClones)Enables/disables shallow clones when checking out from the repository.GitHubRepositorysshKeyAppliesToSubmodules(boolean sshKeyAppliesToSubmodules)Enables/disabled authenticating to submodules with SSH key configured for this repository.GitHubRepositorysubmodulesEnabled(boolean useSubmodules)Enables/disables submodule support.GitHubRepositoryverboseLogs(boolean verboseLogs)Enables/disables verbose logs from git commands.-
Methods inherited from class com.atlassian.bamboo.specs.api.builders.repository.VcsRepository
description, getIdentifier, getName, getOid, humanReadableId, humanReadableType, name, oid, oid, parent, project, repositoryViewer
-
-
-
-
Method Detail
-
repository
public GitHubRepository repository(@NotNull @NotNull java.lang.String repository)
Sets gitHub repository name.- Parameters:
repository- repository name.
-
branch
public GitHubRepository branch(@NotNull @NotNull java.lang.String branch)
Sets branch to check out.
-
authentication
public GitHubRepository authentication(@NotNull @NotNull UserPasswordAuthentication userPasswordAuthentication)
Specifies username/access token authentication.
-
shallowClonesEnabled
public GitHubRepository shallowClonesEnabled(boolean useShallowClones)
Enables/disables shallow clones when checking out from the repository. Fetches the shallowest commit history possible. Do not use if your build depends on full repository history. Shallow clones are switched off by default.
-
submodulesEnabled
public GitHubRepository submodulesEnabled(boolean useSubmodules)
Enables/disables submodule support. Turned off by default.
-
sshKeyAppliesToSubmodules
public GitHubRepository sshKeyAppliesToSubmodules(boolean sshKeyAppliesToSubmodules)
Enables/disabled authenticating to submodules with SSH key configured for this repository.
-
remoteAgentCacheEnabled
public GitHubRepository remoteAgentCacheEnabled(boolean useRemoteAgentCache)
Enables/disables caching repository content on the remote and elastic agents. Bamboo uses caching to reduce bandwidth needed when retrieving source code from the repository. The feature is turned on by default.
-
commandTimeout
public GitHubRepository commandTimeout(java.time.Duration commandTimeout)
Specifies how much time is given for git commands to finish. Default is 180 minutes.
-
commandTimeoutInMinutes
public GitHubRepository commandTimeoutInMinutes(int commandTimeoutMinutes)
Specifies how much time in minutes is given for git commands to finish. Default is 180 minutes.
-
verboseLogs
public GitHubRepository verboseLogs(boolean verboseLogs)
Enables/disables verbose logs from git commands. Off by default.
-
fetchWholeRepository
public GitHubRepository fetchWholeRepository(boolean fetchWholeRepository)
Enforces (or not) fetching all remote refs from the repository rather than single branch. Off by default.
-
lfsEnabled
public GitHubRepository lfsEnabled(boolean useLfs)
Enables/disables git lfs support. Off by default.
-
defaultChangeDetection
public GitHubRepository defaultChangeDetection()
Resets all change detection options to defaults.
-
baseUrl
public GitHubRepository baseUrl(java.lang.String baseUrl)
Checks base Url. Default is "https://github.com"
-
changeDetection
public GitHubRepository changeDetection(@NotNull @NotNull VcsChangeDetection vcsChangeDetection)
Sets change detection options for this repository.- See Also:
VcsChangeDetection
-
build
protected GitHubRepositoryProperties build() throws PropertiesValidationException
- Specified by:
buildin classVcsRepository<GitHubRepository,GitHubRepositoryProperties>- Throws:
PropertiesValidationException
-
-