Interface ChangeDetectionManager

  • All Known Implementing Classes:
    DefaultChangeDetectionManager

    @PublicApi
    public interface ChangeDetectionManager
    Encapsulates the detection of the changes given a repository. It provides a central point to place common change detection logic
    Since:
    2.7
    • Field Detail

      • MAX_OPERATION_RETRIES

        static final int MAX_OPERATION_RETRIES
        Total number of retries to perform for repository operation failure
    • Method Detail

      • collectChangesSinceLastBuildIfTriggered

        @NotNull
        @NotNull BuildChanges collectChangesSinceLastBuildIfTriggered​(@NotNull
                                                                      @NotNull ImmutableChain chain,
                                                                      @Nullable
                                                                      @Nullable Map<String,​String> customVariableValues,
                                                                      @Nullable
                                                                      @Nullable Set<Long> triggeringRepositories)
                                                               throws RepositoryException
        Collect changes for a plan since the last build. Returns changes only if at least one of the build triggering repositories has changes.
        Parameters:
        chain -
        customVariableValues -
        triggeringRepositories - id of repositories that trigger the build
        Returns:
        aggregated changes from all repositories
        Throws:
        RepositoryException
      • collectChangesSinceLastBuildIfTriggered

        @NotNull
        default @NotNull BuildChanges collectChangesSinceLastBuildIfTriggered​(@NotNull
                                                                              @NotNull ImmutableChain chain,
                                                                              @Nullable
                                                                              @Nullable Map<String,​String> customVariableValues,
                                                                              @Nullable
                                                                              @Nullable Set<Long> triggeringRepositories,
                                                                              @NotNull
                                                                              PlanExecutionLaunchControl.ReleaseLocksActions releaseLocksActions)
                                                                       throws RepositoryException
        Collect changes for a plan since the last build. Returns changes only if at least one of the build triggering repositories has changes.
        Parameters:
        chain -
        customVariableValues -
        triggeringRepositories - id of repositories that trigger the build
        releaseLocksActions - actions used for releasing repositories caches locks
        Returns:
        aggregated changes from all repositories
        Throws:
        RepositoryException
        Since:
        9.3
      • collectAllChangesSinceLastBuild

        @NotNull
        @NotNull BuildChanges collectAllChangesSinceLastBuild​(@NotNull
                                                              @NotNull ImmutableChain chain,
                                                              @Nullable
                                                              @Nullable Map<String,​String> customVariableValues,
                                                              @Nullable
                                                              @Nullable String customRevision)
                                                       throws RepositoryException
        Collect changes for a plan since the last build, regardless of whether the build triggering repositories have changes or not. This method suppresses quiet period settings and returns changes immediately.
        Parameters:
        chain -
        customVariableValues -
        customRevision - specify which revision we're going to build (run customised plan dialog)
        Returns:
        aggregated changes from all repositories
        Throws:
        RepositoryException
      • collectAllChangesSinceLastBuild

        default BuildChanges collectAllChangesSinceLastBuild​(@NotNull
                                                             @NotNull ImmutableChain chain,
                                                             @Nullable
                                                             @Nullable Map<String,​String> customVariableValues,
                                                             @Nullable
                                                             @Nullable String customRevision,
                                                             @NotNull
                                                             PlanExecutionLaunchControl.ReleaseLocksActions releaseLocksActions)
                                                      throws RepositoryException
        Collect changes for a plan since the last build, regardless of whether the build triggering repositories have changes or not. This method suppresses quiet period settings and returns changes immediately.
        Parameters:
        chain -
        customVariableValues -
        customRevision - specify which revision we're going to build (run customised plan dialog)
        releaseLocksActions - actions used for releasing repositories caches locks
        Returns:
        aggregated changes from all repositories
        Throws:
        RepositoryException - since 9.3
      • collectChangesSinceLastBuild

        @NotNull
        @NotNull BuildRepositoryChanges collectChangesSinceLastBuild​(@NotNull
                                                                     @NotNull ImmutableChain chain,
                                                                     @NotNull
                                                                     @NotNull PlanRepositoryDefinition repositoryDefinition,
                                                                     @NotNull
                                                                     @NotNull PlanVcsRevisionData lastVcsRevisionData,
                                                                     @Nullable
                                                                     @Nullable Map<String,​String> customVariableValues,
                                                                     @Nullable
                                                                     @Nullable String customRevision)
                                                              throws RepositoryException
        Given a PlanRepositoryDefinition finds the BuildRepositoryChanges object that captures all changes that occurred since the lastVcsRevisionKey to the current latest found on the repository. Method provides manually set variables collection for evaluation during change detection This method suppresses quiet period settings and returns changes immediately.
        Parameters:
        chain -
        repositoryDefinition -
        lastVcsRevisionData -
        customVariableValues -
        customRevision - - override target revision for default repository definition - used by 'run customised build'
        Returns:
        Throws:
        RepositoryException