Class GitRepository

    • Constructor Detail

      • GitRepository

        public GitRepository()
    • Method Detail

      • url

        public GitRepository url​(@NotNull
                                 @NotNull java.lang.String url)
        Sets git repository url.
        Parameters:
        url - repository url
      • branch

        public GitRepository branch​(@NotNull
                                    @NotNull java.lang.String branch)
        Sets branch to check out.
      • withoutAuthentication

        public GitRepository 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.
      • shallowClonesEnabled

        public GitRepository shallowClonesEnabled​(boolean useShallowClones)
        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

        public GitRepository submodulesEnabled​(boolean useSubmodules)
        Enables/disables submodule support. Turned off by default.
      • sshKeyAppliesToSubmodules

        public GitRepository sshKeyAppliesToSubmodules​(boolean sshKeyAppliesToSubmodules)
        Enables/disabled authenticating to submodules with SSH key configured for this repository.
      • remoteAgentCacheEnabled

        public GitRepository 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 GitRepository commandTimeout​(java.time.Duration commandTimeout)
        Specifies how much time is given for git commands to finish. Default is 180 minutes.
      • commandTimeoutInMinutes

        public GitRepository commandTimeoutInMinutes​(int commandTimeoutMinutes)
        Specifies how much time in minutes is given for git commands to finish. Default is 180 minutes.
      • verboseLogs

        public GitRepository verboseLogs​(boolean verboseLogs)
        Enables/disables verbose logs from git commands. Off by default.
      • fetchWholeRepository

        public GitRepository fetchWholeRepository​(boolean fetchWholeRepository)
        Enforces (or not) fetching all remote refs from the repository rather than single branch. Off by default.
      • lfsEnabled

        public GitRepository lfsEnabled​(boolean useLfs)
        Enables/disables git lfs support. Off by default.
      • defaultChangeDetection

        public GitRepository defaultChangeDetection()
        Resets all change detection options to defaults.