Class BitbucketCloudRepository
- 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<BitbucketCloudRepository,BitbucketCloudRepositoryProperties>
-
- com.atlassian.bamboo.specs.builders.repository.bitbucket.cloud.BitbucketCloudRepository
-
public class BitbucketCloudRepository extends VcsRepository<BitbucketCloudRepository,BitbucketCloudRepositoryProperties>
Represents Bitbucket Cloud 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 Constructor Description BitbucketCloudRepository()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BitbucketCloudRepositoryaccountAuthentication(@NotNull SharedCredentialsIdentifier sharedCredentialsIdentifier)Selects a previously definedSharedCredentialsto configure account authentication with bitbucket.orgBitbucketCloudRepositoryaccountAuthentication(@NotNull UserPasswordAuthentication userPasswordAuthentication)Specifies username/password Bitbucket Cloud account authentication.BitbucketCloudRepositorybranch(@NotNull java.lang.String branch)Sets a branch to check out.protected BitbucketCloudRepositoryPropertiesbuild()BitbucketCloudRepositorychangeDetection(VcsChangeDetection vcsChangeDetection)Sets change detection options for this repository.BitbucketCloudRepositorycheckoutAuthentication(@NotNull SharedCredentialsIdentifier sharedCredentialsIdentifier)Selects a previously definedSharedCredentialswhich will be used to checkout repository from Bitbucket Cloud.BitbucketCloudRepositorycheckoutAuthentication(@NotNull SshPrivateKeyAuthentication sshPrivateKeyAuthentication)Specifies SSH private key which will be used to checkout repository from Bitbucket Cloud.BitbucketCloudRepositorycommandTimeout(java.time.Duration commandTimeout)Specifies how much time is given for git commands to finish.BitbucketCloudRepositorycommandTimeoutInMinutes(int commandTimeoutMinutes)Specifies how much time in minutes is given for git commands to finish.BitbucketCloudRepositorydefaultChangeDetection()Resets all change detection options to defaults.BitbucketCloudRepositoryfetchWholeRepository(boolean fetchWholeRepository)Enforces (or not) fetching all remote refs from the repository rather than single branch.BitbucketCloudRepositorylfsEnabled(boolean useLfs)Enables/disables git lfs support.BitbucketCloudRepositoryremoteAgentCacheEnabled(boolean useRemoteAgentCache)Enables/disables caching repository content on the remote and elastic agents.BitbucketCloudRepositoryrepositorySlug(@NotNull java.lang.String owner, @NotNull java.lang.String repositorySlug)Sets the Bitbucket repository slug to checkout.BitbucketCloudRepositoryshallowClonesEnabled(boolean useShallowClones)Enables/disables shallow clones when checking out from the repository.BitbucketCloudRepositorysshKeyAppliesToSubmodules(boolean sshKeyAppliesToSubmodules)Enables/disabled authenticating to submodules with SSH key configured for this repository.BitbucketCloudRepositorysubmodulesEnabled(boolean useSubmodules)Enables/disables submodule support.BitbucketCloudRepositoryverboseLogs(boolean verboseLogs)Enables/disables verbose logs from git commands.BitbucketCloudRepositorywebhookEnabled(boolean webhookEnabled)Enables webhooks support for the repository.-
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 Detail
-
BitbucketCloudRepository
public BitbucketCloudRepository() throws PropertiesValidationException- Throws:
PropertiesValidationException
-
-
Method Detail
-
repositorySlug
public BitbucketCloudRepository repositorySlug(@NotNull @NotNull java.lang.String owner, @NotNull @NotNull java.lang.String repositorySlug)
Sets the Bitbucket repository slug to checkout. A repository slug is a URL-friendly version of a repository name, automatically generated by Bitbucket Cloud for use in the URL.
This field is required and it must represents existing Bitbucket Cloud repository.
-
branch
public BitbucketCloudRepository branch(@NotNull @NotNull java.lang.String branch)
Sets a branch to check out. This field is required.
-
shallowClonesEnabled
public BitbucketCloudRepository shallowClonesEnabled(boolean useShallowClones)
Enables/disables shallow clones when checking out from the repository. With shallow clones on, Bamboo fetches the shallowest commit history possible. Do not use if your build depends on full repository history.
Shallow clones are switched off by default.
Option does nothing with Mercurial type of repository.
-
sshKeyAppliesToSubmodules
public BitbucketCloudRepository sshKeyAppliesToSubmodules(boolean sshKeyAppliesToSubmodules)
Enables/disabled authenticating to submodules with SSH key configured for this repository.
-
submodulesEnabled
public BitbucketCloudRepository submodulesEnabled(boolean useSubmodules)
Enables/disables submodule support. Turned off by default.Option does nothing with Mercurial type of repository.
-
remoteAgentCacheEnabled
public BitbucketCloudRepository 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 in Git repositories
Option does nothing with Mercurial type of repository.
-
commandTimeout
public BitbucketCloudRepository commandTimeout(java.time.Duration commandTimeout)
Specifies how much time is given for git commands to finish. Default is 180 minutes.
-
commandTimeoutInMinutes
public BitbucketCloudRepository commandTimeoutInMinutes(int commandTimeoutMinutes)
Specifies how much time in minutes is given for git commands to finish. Default is 180 minutes.
-
verboseLogs
public BitbucketCloudRepository verboseLogs(boolean verboseLogs)
Enables/disables verbose logs from git commands. Off by default.
-
fetchWholeRepository
public BitbucketCloudRepository fetchWholeRepository(boolean fetchWholeRepository)
Enforces (or not) fetching all remote refs from the repository rather than single branch. Off by default.
-
lfsEnabled
public BitbucketCloudRepository lfsEnabled(boolean useLfs)
Enables/disables git lfs support. Off by default.Option does nothing with Mercurial type of repository.
-
webhookEnabled
public BitbucketCloudRepository webhookEnabled(boolean webhookEnabled)
Enables webhooks support for the repository. Off by default.
-
defaultChangeDetection
public BitbucketCloudRepository defaultChangeDetection()
Resets all change detection options to defaults.
-
changeDetection
public BitbucketCloudRepository changeDetection(VcsChangeDetection vcsChangeDetection)
Sets change detection options for this repository.- See Also:
VcsChangeDetection
-
accountAuthentication
public BitbucketCloudRepository accountAuthentication(@NotNull @NotNull SharedCredentialsIdentifier sharedCredentialsIdentifier)
Selects a previously defined
SharedCredentialsto configure account authentication with bitbucket.orgCurrently only username/password credentials are supported.
-
accountAuthentication
public BitbucketCloudRepository accountAuthentication(@NotNull @NotNull UserPasswordAuthentication userPasswordAuthentication)
Specifies username/password Bitbucket Cloud account authentication.
The password can be defined in both Bamboo-encrypted and plain format.
- See Also:
- Encryption in Bamboo Specs
-
checkoutAuthentication
public BitbucketCloudRepository checkoutAuthentication(@NotNull @NotNull SharedCredentialsIdentifier sharedCredentialsIdentifier)
Selects a previously defined
SharedCredentialswhich will be used to checkout repository from Bitbucket Cloud. Currently SSH credentials are supported.If checkout authentication is not configured, the accountAuthentication will be used.
-
checkoutAuthentication
public BitbucketCloudRepository checkoutAuthentication(@NotNull @NotNull SshPrivateKeyAuthentication sshPrivateKeyAuthentication)
Specifies SSH private key which will be used to checkout repository from Bitbucket Cloud. If checkout authentication is not configured, the accountAuthentication will be used.
The key and passphrase can be defined in both Bamboo-encrypted and plain format.
- See Also:
- Encryption in Bamboo Specs
-
build
protected BitbucketCloudRepositoryProperties build() throws PropertiesValidationException
- Specified by:
buildin classVcsRepository<BitbucketCloudRepository,BitbucketCloudRepositoryProperties>- Throws:
PropertiesValidationException
-
-