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 com.atlassian.bamboo.specs.api.builders.repository.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 -
Method Summary
Modifier and TypeMethodDescriptionauthentication(@NotNull com.atlassian.bamboo.specs.api.builders.credentials.SharedCredentialsIdentifier sharedCredentialsIdentifier) Selects a previously definedSharedCredentialsto configure account authentication with Github.authentication(@NotNull UserPasswordAuthentication userPasswordAuthentication) Specifies username/access token authentication.Checks base Url.Sets branch to check out.protected GitHubRepositoryPropertiesbuild()changeDetection(@NotNull com.atlassian.bamboo.specs.api.builders.repository.VcsChangeDetection vcsChangeDetection) Sets change detection options for this repository.commandTimeout(Duration commandTimeout) Specifies how much time is given for git commands to finish.commandTimeoutInMinutes(int commandTimeoutMinutes) Specifies how much time in minutes is given for git commands to finish.Resets all change detection options to defaults.fetchWholeRepository(boolean fetchWholeRepository) Enforces (or not) fetching all remote refs from the repository rather than single branch.lfsEnabled(boolean useLfs) Enables/disables git lfs support.remoteAgentCacheEnabled(boolean useRemoteAgentCache) Enables/disables caching repository content on the remote and elastic agents.repository(@NotNull String repository) Sets gitHub repository name.shallowClonesEnabled(boolean useShallowClones) Enables/disables shallow clones when checking out from the repository.sshKeyAppliesToSubmodules(boolean sshKeyAppliesToSubmodules) Enables/disabled authenticating to submodules with SSH key configured for this repository.submodulesEnabled(boolean useSubmodules) Enables/disables submodule support.verboseLogs(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
-
Constructor Details
-
GitHubRepository
public GitHubRepository()
-
-
Method Details
-
repository
Sets gitHub repository name.- Parameters:
repository- repository name.
-
branch
Sets branch to check out. -
authentication
public GitHubRepository authentication(@NotNull @NotNull UserPasswordAuthentication userPasswordAuthentication) Specifies username/access token authentication. -
shallowClonesEnabled
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
Enables/disables submodule support. Turned off by default. -
sshKeyAppliesToSubmodules
Enables/disabled authenticating to submodules with SSH key configured for this repository. -
remoteAgentCacheEnabled
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
Specifies how much time is given for git commands to finish. Default is 180 minutes. -
commandTimeoutInMinutes
Specifies how much time in minutes is given for git commands to finish. Default is 180 minutes. -
verboseLogs
Enables/disables verbose logs from git commands. Off by default. -
fetchWholeRepository
Enforces (or not) fetching all remote refs from the repository rather than single branch. Off by default. -
lfsEnabled
Enables/disables git lfs support. Off by default. -
defaultChangeDetection
Resets all change detection options to defaults. -
baseUrl
Checks base Url. Default is "https://github.com" -
changeDetection
public GitHubRepository changeDetection(@NotNull @NotNull com.atlassian.bamboo.specs.api.builders.repository.VcsChangeDetection vcsChangeDetection) Sets change detection options for this repository.- See Also:
-
VcsChangeDetection
-
build
protected GitHubRepositoryProperties build() throws com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException- Specified by:
buildin classcom.atlassian.bamboo.specs.api.builders.repository.VcsRepository<GitHubRepository,GitHubRepositoryProperties> - Throws:
com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException
-