Class BitbucketServerRepository
- 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<BitbucketServerRepository,BitbucketServerRepositoryProperties>
-
- com.atlassian.bamboo.specs.builders.repository.bitbucket.server.BitbucketServerRepository
-
public class BitbucketServerRepository extends VcsRepository<BitbucketServerRepository,BitbucketServerRepositoryProperties>
Represents Bitbucket Server 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 BitbucketServerRepository()Specifies a Bitbucket Server repository
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BitbucketServerRepositorybranch(@NotNull java.lang.String branch)Sets a branch to check out.protected BitbucketServerRepositoryPropertiesbuild()BitbucketServerRepositorychangeDetection(@NotNull VcsChangeDetection vcsChangeDetection)Sets change detection options for this repository.BitbucketServerRepositorycommandTimeout(java.time.Duration commandTimeout)Specifies how much time is given for git commands to finish.BitbucketServerRepositorycommandTimeoutInMinutes(int commandTimeoutMinutes)Specifies how much time in minutes is given for git commands to finish.BitbucketServerRepositorydefaultChangeDetection()Resets all change detection options to defaults.BitbucketServerRepositoryfetchWholeRepository(boolean fetchWholeRepository)Enforces (or not) fetching all remote refs from the repository rather than single branch.BitbucketServerRepositorylfsEnabled(boolean useLfs)Enables/disables git lfs support.BitbucketServerRepositorymirror(@NotNull BitbucketServerMirror mirror)Sets mirror to be used for cloning repository.BitbucketServerRepositoryprojectKey(@NotNull java.lang.String projectKey)Sets key of Bitbucket Server's project which repository belongs to.BitbucketServerRepositoryremoteAgentCacheEnabled(boolean useRemoteAgentCache)Enables/disables caching repository content on the remote and elastic agents.BitbucketServerRepositoryrepositorySlug(@NotNull java.lang.String repositorySlug)Sets the repository slug.BitbucketServerRepositoryserver(@NotNull ApplicationLink server)Selects Bitbucket Server instance which hosts this repository.BitbucketServerRepositoryshallowClonesEnabled(boolean useShallowClones)Enables/disables shallow clones when checking out from the repository.BitbucketServerRepositorysshCloneUrl(@NotNull java.lang.String sshCloneUrl)Sets repository url that is used for cloning the repository.BitbucketServerRepositorysshKeyAppliesToSubmodules(boolean sshKeyAppliesToSubmodules)Enables/disabled authenticating to submodules with SSH key configured for this repository.BitbucketServerRepositorysshPrivateKey(@NotNull java.lang.String sshPrivateKey)Sets private SSH key of the repository.BitbucketServerRepositorysshPublicKey(@NotNull java.lang.String sshPublicKey)Sets public SSH key of the repository.BitbucketServerRepositorysubmodulesEnabled(boolean useSubmodules)Enables/disables submodule support.BitbucketServerRepositoryverboseLogs(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 Detail
-
BitbucketServerRepository
public BitbucketServerRepository()
Specifies a Bitbucket Server repositoryA repository can be global, in which case any changes made to a repository are automatically applied to all plans or jobs that use that repository. Repository can also be defined in scope of a
Plan, in which case it is only accessible in context of plan it is defined for.
-
-
Method Detail
-
server
public BitbucketServerRepository server(@NotNull @NotNull ApplicationLink server)
Selects Bitbucket Server instance which hosts this repository. The Bitbucket Server must be accessible from Bamboo via an application link.- Parameters:
server- Bitbucket Server instance- See Also:
ApplicationLink
-
projectKey
public BitbucketServerRepository projectKey(@NotNull @NotNull java.lang.String projectKey)
Sets key of Bitbucket Server's project which repository belongs to.
-
repositorySlug
public BitbucketServerRepository repositorySlug(@NotNull @NotNull java.lang.String repositorySlug)
Sets the repository slug. A repository slug is a URL-friendly version of a repository name, automatically generated by Bitbucket for use in the URL.To find out what is the repository slug of your repository, open it in Bitbucket Server UI and check the URL.
-
sshPublicKey
public BitbucketServerRepository sshPublicKey(@NotNull @NotNull java.lang.String sshPublicKey)
Sets public SSH key of the repository.If specified, a private key should be specified as well.
If not provided, Bamboo will attempt to generate and install new SSH keys into Bamboo Server instance. This property is required when using repository stored Specs feature.
-
sshPrivateKey
public BitbucketServerRepository sshPrivateKey(@NotNull @NotNull java.lang.String sshPrivateKey)
Sets private SSH key of the repository. The key can be defined in both Bamboo-encrypted and plain format.If specified, a public key should be specified as well.
If not provided, Bamboo will attempt to generate and install new SSH keys into Bamboo Server instance. This property is required when using repository stored Specs feature.
- See Also:
- Encryption in Bamboo Specs
-
sshCloneUrl
public BitbucketServerRepository sshCloneUrl(@NotNull @NotNull java.lang.String sshCloneUrl)
Sets repository url that is used for cloning the repository. Must be an ssh url. If not defined, the importer tries to fetch this value from Bitbucket. This property is required when using repository stored Specs feature.
-
branch
public BitbucketServerRepository branch(@NotNull @NotNull java.lang.String branch)
Sets a branch to check out.
-
shallowClonesEnabled
public BitbucketServerRepository 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.
-
submodulesEnabled
public BitbucketServerRepository submodulesEnabled(boolean useSubmodules)
Enables/disables submodule support. Turned off by default.
-
sshKeyAppliesToSubmodules
public BitbucketServerRepository sshKeyAppliesToSubmodules(boolean sshKeyAppliesToSubmodules)
Enables/disabled authenticating to submodules with SSH key configured for this repository.
-
remoteAgentCacheEnabled
public BitbucketServerRepository 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 BitbucketServerRepository commandTimeout(java.time.Duration commandTimeout)
Specifies how much time is given for git commands to finish. Default is 180 minutes.
-
commandTimeoutInMinutes
public BitbucketServerRepository commandTimeoutInMinutes(int commandTimeoutMinutes)
Specifies how much time in minutes is given for git commands to finish. Default is 180 minutes.
-
verboseLogs
public BitbucketServerRepository verboseLogs(boolean verboseLogs)
Enables/disables verbose logs from git commands. Off by default.
-
fetchWholeRepository
public BitbucketServerRepository fetchWholeRepository(boolean fetchWholeRepository)
Enforces (or not) fetching all remote refs from the repository rather than single branch. Off by default.
-
lfsEnabled
public BitbucketServerRepository lfsEnabled(boolean useLfs)
Enables/disables git lfs support. Off by default.
-
defaultChangeDetection
public BitbucketServerRepository defaultChangeDetection()
Resets all change detection options to defaults.
-
changeDetection
public BitbucketServerRepository changeDetection(@NotNull @NotNull VcsChangeDetection vcsChangeDetection)
Sets change detection options for this repository.- See Also:
VcsChangeDetection
-
mirror
public BitbucketServerRepository mirror(@NotNull @NotNull BitbucketServerMirror mirror)
Sets mirror to be used for cloning repository. Leave it empty if not using mirrors.
-
build
protected BitbucketServerRepositoryProperties build()
- Specified by:
buildin classVcsRepository<BitbucketServerRepository,BitbucketServerRepositoryProperties>
-
-