Class BitbucketServerRepository
-
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 TypeMethodDescriptionSets a branch to check out.protected BitbucketServerRepositoryPropertiesbuild()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.mirror(@NotNull BitbucketServerMirror mirror) Sets mirror to be used for cloning repository.projectKey(@NotNull String projectKey) Sets key of Bitbucket Server's project which repository belongs to.remoteAgentCacheEnabled(boolean useRemoteAgentCache) Enables/disables caching repository content on the remote and elastic agents.repositorySlug(@NotNull String repositorySlug) Sets the repository slug.server(@NotNull ApplicationLink server) Selects Bitbucket Server instance which hosts this repository.shallowClonesEnabled(boolean useShallowClones) Enables/disables shallow clones when checking out from the repository.sshCloneUrl(@NotNull String sshCloneUrl) Sets repository url that is used for cloning the repository.sshKeyAppliesToSubmodules(boolean sshKeyAppliesToSubmodules) Enables/disabled authenticating to submodules with SSH key configured for this repository.sshPrivateKey(@NotNull String sshPrivateKey) Sets private SSH key of the repository.sshPublicKey(@NotNull String sshPublicKey) Sets public SSH key of the repository.submodulesEnabled(boolean useSubmodules) Enables/disables submodule support.submodulesUseShallowClonesEnabled(boolean useSubmodulesWithShallowClones) Enables/disables shallow clone support for submodules.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
-
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 Details
-
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:
-
projectKey
Sets key of Bitbucket Server's project which repository belongs to. -
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
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
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:
-
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
Sets a branch to check out. -
shallowClonesEnabled
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
Enables/disables submodule support. Turned off by default. -
submodulesUseShallowClonesEnabled
public BitbucketServerRepository submodulesUseShallowClonesEnabled(boolean useSubmodulesWithShallowClones) 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
public BitbucketServerRepository changeDetection(@NotNull @NotNull VcsChangeDetection vcsChangeDetection) Sets change detection options for this repository.- See Also:
-
mirror
Sets mirror to be used for cloning repository. Leave it empty if not using mirrors. -
build
- Specified by:
buildin classVcsRepository<BitbucketServerRepository,BitbucketServerRepositoryProperties>
-