Class GitRepository
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<GitRepository,GitRepositoryProperties>
com.atlassian.bamboo.specs.builders.repository.git.GitRepository
Represents a git repository in Bamboo.
-
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 SharedCredentialsIdentifier sharedCredentialsIdentifier) Selects a previously definedSharedCredentialsto authenticate with git server.authentication(@NotNull SshPrivateKeyAuthentication sshPrivateKeyAuthentication) Specifies SSH private key authentication.authentication(@NotNull UserPasswordAuthentication userPasswordAuthentication) Specifies username/password authentication.Sets branch to check out.protected GitRepositoryPropertiesbuild()changeDetection(@NotNull 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.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.submodulesUseShallowClonesEnabled(boolean useSubmodulesWithShallowClones) Enables/disables shallow clone support for submodules.Sets git repository url.verboseLogs(boolean verboseLogs) Enables/disables verbose logs from git commands.Removes authentication details.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
-
GitRepository
public GitRepository()
-
-
Method Details
-
url
Sets git repository url.- Parameters:
url- repository url
-
branch
Sets branch to check out. -
withoutAuthentication
Removes authentication details. Bamboo will not enforce any authentication method when connecting to the repository. Depending on the selected protocol and git client configuration, authentication may still be performed out of Bamboo's control. -
authentication
public GitRepository authentication(@NotNull @NotNull UserPasswordAuthentication userPasswordAuthentication) Specifies username/password authentication. -
authentication
public GitRepository authentication(@NotNull @NotNull SshPrivateKeyAuthentication sshPrivateKeyAuthentication) Specifies SSH private key 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. -
submodulesUseShallowClonesEnabled
Enables/disables shallow clone support for submodules. 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. -
changeDetection
Sets change detection options for this repository.- See Also:
-
build
- Specified by:
buildin classVcsRepository<GitRepository,GitRepositoryProperties>
-