public class GitHubRepository extends VcsRepository<GitHubRepository,GitHubRepositoryProperties>
GitHub repository.
  • Constructor Details

    • GitHubRepository

      public GitHubRepository()
  • Method Details

    • repository

      public GitHubRepository repository(@NotNull @NotNull String repository)
      Sets gitHub repository name.
      Parameters:
      repository - repository name.
    • branch

      public GitHubRepository branch(@NotNull @NotNull String branch)
      Sets branch to check out.
    • authentication

      public GitHubRepository authentication(@NotNull @NotNull UserPasswordAuthentication userPasswordAuthentication)
      Specifies username/access token authentication.
    • authentication

      public GitHubRepository authentication(@NotNull @NotNull SharedCredentialsIdentifier sharedCredentialsIdentifier)
      Selects a previously defined SharedCredentials to configure account authentication with Github. Currently, only username/password credentials are supported.
    • shallowClonesEnabled

      public GitHubRepository 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 GitHubRepository submodulesEnabled(boolean useSubmodules)
      Enables/disables submodule support. Turned off by default.
    • sshKeyAppliesToSubmodules

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

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

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

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

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

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

      public GitHubRepository defaultChangeDetection()
      Resets all change detection options to defaults.
    • baseUrl

      public GitHubRepository baseUrl(String baseUrl)
      Checks base Url. Default is "https://github.com"
    • changeDetection

      public GitHubRepository changeDetection(@NotNull @NotNull VcsChangeDetection vcsChangeDetection)
      Sets change detection options for this repository.
      See Also:
    • webhookEnabled

      public GitHubRepository webhookEnabled(boolean webhookEnabled)
      Enables webhooks support for the repository. Off by default.
      Since:
      10.1
    • build

      Specified by:
      build in class VcsRepository<GitHubRepository,GitHubRepositoryProperties>
      Throws:
      PropertiesValidationException