Class BitbucketCloudRepository

    • 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.
      • checkoutAuthentication

        public BitbucketCloudRepository checkoutAuthentication​(@NotNull
                                                               @NotNull SharedCredentialsIdentifier sharedCredentialsIdentifier)

        Selects a previously defined SharedCredentials which 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