Package com.atlassian.bamboo.v2.trigger
Class DefaultChangeDetectionManager
java.lang.Object
com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager
- All Implemented Interfaces:
ChangeDetectionManager
-
Field Summary
Fields inherited from interface com.atlassian.bamboo.v2.trigger.ChangeDetectionManager
MAX_OPERATION_RETRIES -
Constructor Summary
ConstructorsConstructorDescriptionDefaultChangeDetectionManager(BuildContextFactory buildContextFactory, BuildLoggerManager buildLoggerManager, org.apache.struts2.text.TextProvider textProvider, VariableDefinitionManager variableDefinitionManager, CustomVariableContext customVariableContext, PlanVcsRevisionHistoryService planVcsRevisionHistoryService, BranchCommitInformationManager branchCommitInformationManager, BranchIntegrationService branchIntegrationService, ChainBranchManager chainBranchManager, RepositoryCachingFacade repositoryCachingFacade, VcsRepositoryManager vcsRepositoryManager, AdministrationConfigurationAccessor administrationConfigurationAccessor) -
Method Summary
Modifier and TypeMethodDescription@NotNull BuildChangescollectAllChangesSinceLastBuild(@NotNull ImmutableChain chain, @Nullable Map<String, String> customVariableValues, @Nullable String customRevision) Collect changes for a plan since the last build, regardless of whether the build triggering repositories have changes or not.collectAllChangesSinceLastBuild(@NotNull ImmutableChain chain, @Nullable Map<String, String> customVariableValues, @Nullable String customRevision, PlanExecutionLaunchControl.ReleaseLocksActions releaseLocksActions) Collect changes for a plan since the last build, regardless of whether the build triggering repositories have changes or not.@NotNull BuildRepositoryChangescollectChangesBetween(@NotNull ImmutableChain chain, @NotNull PlanRepositoryDefinition repositoryDefinition, @Nullable PlanVcsRevisionData fromVcsRevisionData, @NotNull PlanVcsRevisionData toVcsRevisionData) Given aPlanRepositoryDefinitionfinds theBuildChangesobject that captures all changes that occurred between the fromVcsRevisionKey to toVcsRevisionKey This method suppresses quiet period settings and returns changes immediately.@NotNull BuildRepositoryChangescollectChangesSinceLastBuild(@NotNull ImmutableChain chain, @NotNull PlanRepositoryDefinition repositoryDefinition, @NotNull PlanVcsRevisionData lastVcsRevisionData, @Nullable Map<String, String> customVariableValues, @Nullable String customRevision) Given aPlanRepositoryDefinitionfinds theBuildRepositoryChangesobject that captures all changes that occurred since the lastVcsRevisionKey to the current latest found on the repository.@NotNull BuildChangescollectChangesSinceLastBuildIfTriggered(@NotNull ImmutableChain chain, @Nullable Map<String, String> customVariableValues, @Nullable Set<Long> triggeringRepositories) Collect changes for a plan since the last build.@NotNull BuildChangescollectChangesSinceLastBuildIfTriggered(@NotNull ImmutableChain chain, @Nullable Map<String, String> customVariableValues, @Nullable Set<Long> triggeringRepositories, PlanExecutionLaunchControl.ReleaseLocksActions releaseLocksActions) Collect changes for a plan since the last build.protected @NotNull BuildRepositoryChangescollectChangesSinceLastBuildInternal(@NotNull ImmutableChain chain, @NotNull PlanRepositoryDefinition repositoryDefinition, @NotNull PlanVcsRevisionData lastVcsRevisionData, @Nullable Map<String, String> customVariableValues, @Nullable String customRevision, boolean isBuildTrigger) voidupdateIntegrationRepositoryDetails(ImmutableChain chain, BuildChanges buildChanges)
-
Constructor Details
-
DefaultChangeDetectionManager
public DefaultChangeDetectionManager(BuildContextFactory buildContextFactory, BuildLoggerManager buildLoggerManager, org.apache.struts2.text.TextProvider textProvider, VariableDefinitionManager variableDefinitionManager, CustomVariableContext customVariableContext, PlanVcsRevisionHistoryService planVcsRevisionHistoryService, BranchCommitInformationManager branchCommitInformationManager, BranchIntegrationService branchIntegrationService, ChainBranchManager chainBranchManager, RepositoryCachingFacade repositoryCachingFacade, VcsRepositoryManager vcsRepositoryManager, AdministrationConfigurationAccessor administrationConfigurationAccessor)
-
-
Method Details
-
collectChangesSinceLastBuildIfTriggered
@NotNull public @NotNull BuildChanges collectChangesSinceLastBuildIfTriggered(@NotNull @NotNull ImmutableChain chain, @Nullable @Nullable Map<String, String> customVariableValues, @Nullable @Nullable Set<Long> triggeringRepositories) throws RepositoryExceptionDescription copied from interface:ChangeDetectionManagerCollect changes for a plan since the last build. Returns changes only if at least one of the build triggering repositories has changes.- Specified by:
collectChangesSinceLastBuildIfTriggeredin interfaceChangeDetectionManager- Parameters:
chain-customVariableValues-triggeringRepositories- id of repositories that trigger the build- Returns:
- aggregated changes from all repositories
- Throws:
RepositoryException
-
collectChangesSinceLastBuildIfTriggered
@NotNull public @NotNull BuildChanges collectChangesSinceLastBuildIfTriggered(@NotNull @NotNull ImmutableChain chain, @Nullable @Nullable Map<String, String> customVariableValues, @Nullable @Nullable Set<Long> triggeringRepositories, @NotNull PlanExecutionLaunchControl.ReleaseLocksActions releaseLocksActions) throws RepositoryExceptionDescription copied from interface:ChangeDetectionManagerCollect changes for a plan since the last build. Returns changes only if at least one of the build triggering repositories has changes.- Specified by:
collectChangesSinceLastBuildIfTriggeredin interfaceChangeDetectionManager- Parameters:
chain-customVariableValues-triggeringRepositories- id of repositories that trigger the buildreleaseLocksActions- actions used for releasing repositories caches locks- Returns:
- aggregated changes from all repositories
- Throws:
RepositoryException
-
collectAllChangesSinceLastBuild
@NotNull public @NotNull BuildChanges collectAllChangesSinceLastBuild(@NotNull @NotNull ImmutableChain chain, @Nullable @Nullable Map<String, String> customVariableValues, @Nullable @Nullable String customRevision) throws RepositoryExceptionDescription copied from interface:ChangeDetectionManagerCollect 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.- Specified by:
collectAllChangesSinceLastBuildin interfaceChangeDetectionManager- 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
public BuildChanges collectAllChangesSinceLastBuild(@NotNull @NotNull ImmutableChain chain, @Nullable @Nullable Map<String, String> customVariableValues, @Nullable @Nullable String customRevision, @NotNull PlanExecutionLaunchControl.ReleaseLocksActions releaseLocksActions) throws RepositoryExceptionDescription copied from interface:ChangeDetectionManagerCollect 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.- Specified by:
collectAllChangesSinceLastBuildin interfaceChangeDetectionManager- 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 public @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 RepositoryExceptionDescription copied from interface:ChangeDetectionManagerGiven aPlanRepositoryDefinitionfinds theBuildRepositoryChangesobject 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.- Specified by:
collectChangesSinceLastBuildin interfaceChangeDetectionManager- Parameters:
chain-repositoryDefinition-lastVcsRevisionData-customVariableValues-customRevision- - override target revision for default repository definition - used by 'run customised build'- Returns:
- Throws:
RepositoryException
-
collectChangesSinceLastBuildInternal
@NotNull protected @NotNull BuildRepositoryChanges collectChangesSinceLastBuildInternal(@NotNull @NotNull ImmutableChain chain, @NotNull @NotNull PlanRepositoryDefinition repositoryDefinition, @NotNull @NotNull PlanVcsRevisionData lastVcsRevisionData, @Nullable @Nullable Map<String, String> customVariableValues, @Nullable @Nullable String customRevision, boolean isBuildTrigger) throws RepositoryException- Throws:
RepositoryException
-
collectChangesBetween
@NotNull public @NotNull BuildRepositoryChanges collectChangesBetween(@NotNull @NotNull ImmutableChain chain, @NotNull @NotNull PlanRepositoryDefinition repositoryDefinition, @Nullable @Nullable PlanVcsRevisionData fromVcsRevisionData, @NotNull @NotNull PlanVcsRevisionData toVcsRevisionData) throws RepositoryException Description copied from interface:ChangeDetectionManagerGiven aPlanRepositoryDefinitionfinds theBuildChangesobject that captures all changes that occurred between the fromVcsRevisionKey to toVcsRevisionKey This method suppresses quiet period settings and returns changes immediately.- Specified by:
collectChangesBetweenin interfaceChangeDetectionManager- Parameters:
chain-repositoryDefinition-fromVcsRevisionData-toVcsRevisionData-- Returns:
- Throws:
RepositoryException
-
updateIntegrationRepositoryDetails
public void updateIntegrationRepositoryDetails(ImmutableChain chain, BuildChanges buildChanges) throws RepositoryException - Specified by:
updateIntegrationRepositoryDetailsin interfaceChangeDetectionManager- Throws:
RepositoryException
-