Interface RepositoryV2

All Superinterfaces:
BambooPluginModule, Serializable
All Known Subinterfaces:
BitbucketDelegatedRepository, BranchAwareRepository, BranchDetectionCapableRepository, BranchInformationProvider, BranchingAwareRepository, BranchMergingAwareRepository, CachingAwareRepository, CheckoutCustomRevisionDataAwareRepository, CommitIsolationAwareRepository, CustomRevisionDataAwareRepository, CustomSourceDirectoryAwareRepository, CustomVariableProviderRepository, EditActionAwareRepository, IncludeExcludeAwareRepository, InitialBuildAwareRepository, MavenPomAccessorCapableRepository, OnceOffCapableRepository, PreparableRepository, PushCapableRepository, QuietPeriodAwareRepository, Repository, RepositoryEventAware, RequirementsAwareRepository, RequiresRepositoryData, SelectableAuthenticationRepository, StandaloneRepository, StashRepository, TaggingAwareRepository, TestConnectionAwareRepository
All Known Implementing Classes:
AbstractRepository, AbstractStandaloneRepository, BitbucketRepository, GitHubRepository, GitRepository, NullRepository, StashRepositoryImpl, SvnRepository

public interface RepositoryV2 extends Serializable, BambooPluginModule
  • Method Details

    • collectChangesSinceLastBuild

      @NotNull @NotNull BuildRepositoryChanges collectChangesSinceLastBuild(@NotNull @NotNull String planKey, @Nullable @Nullable String lastVcsRevisionKey) throws RepositoryException
      Collects the changes since the lastVcsRevisionKey. This method is called only on server side (never on agent).
      Parameters:
      planKey -
      lastVcsRevisionKey - can be null, if null you should ensure the correct vcsrevisionkey is returned in the BuildChanges object.
      Returns:
      A build changes object with the appropriate build changes
      Throws:
      RepositoryException - if something goes wrong
    • getSourceCodeDirectory

      @NotNull @Deprecated @NotNull File getSourceCodeDirectory(@NotNull @NotNull PlanKey planKey) throws RepositoryException
      Deprecated.
      since 3.3 Repository must handle checkout to any sub-directory.
      Where has the source code been checked out? Notes: - The method needs to be implemented if the repository doesn't implement CustomSourceDirectoryAwareRepository - The returned path should be absolute
      Parameters:
      planKey - Plan's key
      Returns:
      The location of the source code checked out by the repository
      Throws:
      RepositoryException - A generic failure
    • isRepositoryDifferent

      boolean isRepositoryDifferent(@NotNull @NotNull Repository repository)
      Checks if the current repo is the same as the given repository
      Parameters:
      repository - to compare against
      Returns:
      true of repositories are different, false if the same;