Interface GitConfigurationProvider

All Known Implementing Classes:
GitConfigurationProviderImpl

@PublicApi public interface GitConfigurationProvider
API for providing repository git plugin's specific configuration based on repository data coming from any repository plugin (Bitbucket, Github, etc.).
Since:
10.1
  • Method Details

    • isUsingSharedCredentials

      static boolean isUsingSharedCredentials(@NotNull @NotNull Map<String,String> serverCfg)
      Determines if the repository with the provided server configuration uses shared credentials.
      Parameters:
      serverCfg - the server configuration map
      Returns:
      true if the repository uses shared credentials, false otherwise
    • getSharedCredentialsIdField

      @NotNull static @NotNull String getSharedCredentialsIdField(@NotNull @NotNull Map<String,String> config)
      Gets the shared credentials ID field to look up based on the provided configuration.
      Parameters:
      config - the server configuration map
      Returns:
      the shared credentials ID field
    • getRepositoryUrl

      @NotNull @NotNull String getRepositoryUrl(@NotNull @NotNull VcsRepositoryData vcsRepositoryData)
      Retrieves the repository URL from the provided VCS repository data.
      Parameters:
      vcsRepositoryData - the VCS repository data
      Returns:
      the repository URL
    • getSubstitutedRepositoryUrl

      @NotNull @NotNull String getSubstitutedRepositoryUrl(@NotNull @NotNull VcsRepositoryData vcsRepositoryData)
      Retrieves the repository URL from the provided VCS repository data, with variables substituted.
      Parameters:
      vcsRepositoryData - the VCS repository data
      Returns:
      the substituted repository URL
    • getCredentialsBag

      @NotNull @NotNull GitCredentialsBag getCredentialsBag(@NotNull @NotNull VcsRepositoryData vcsRepositoryData)
      Retrieves the git credentials bag from the provided VCS repository data.
      Parameters:
      vcsRepositoryData - the VCS repository data
      Returns:
      the Git credentials bag
    • substituteCredentialsBag

      @NotNull @NotNull GitCredentialsBag substituteCredentialsBag(@NotNull @NotNull GitCredentialsBag gitCredentialsBag)
      Substitutes the git credentials bag with variable context and returns a new immutable object. The provided credentials bag is not modified; a new object is returned.
      Parameters:
      gitCredentialsBag - the credentials bag to transform
      Returns:
      the substituted Git credentials bag
    • getCacheKey

      @NotNull @NotNull GitCacheKey getCacheKey(@NotNull @NotNull VcsRepositoryData vcsRepositoryData)
      Constructs a git cache key based on the provided VCS repository data. A git cache is an on-disk clone of a git repository.
      Parameters:
      vcsRepositoryData - the VCS repository data
      Returns:
      the git cache key