Package com.atlassian.bamboo.repository
Interface BranchMergingAwareRepository
- All Superinterfaces:
BambooPluginModule,BranchAwareRepository,BuildConfigurationAwarePlugin,ConfigurablePlugin,ConvertibleFromConfig,CustomSourceDirectoryAwareRepository,DescriptionProvider,InitablePluginModule,NameProvider,RenderableBuildConfiguration,Repository,RepositoryV2,Serializable
- All Known Subinterfaces:
BitbucketDelegatedRepository,StashRepository
- All Known Implementing Classes:
BitbucketRepository,GitHubRepository,GitRepository,StashRepositoryImpl
public interface BranchMergingAwareRepository
extends BranchAwareRepository, CustomSourceDirectoryAwareRepository
-
Field Summary
Fields inherited from interface com.atlassian.bamboo.repository.Repository
SELECTED_REPOSITORY, UNKNOWN_HOST -
Method Summary
Modifier and TypeMethodDescription@Nullable StringGives repository a chance to display a HTML on the UI when user is enabling "Branch Integration" featurebooleanbooleanmergeWorkspaceWith(@NotNull BuildContext buildContext, @NotNull File checkoutDirectory, @NotNull String targetRevision) Merges a workspace located in checkout directory with the target revision.@NotNull StringretrieveSourceCode(@NotNull BuildContext buildContext, @Nullable String vcsRevisionKey, @NotNull File sourceDirectory, int depth) Checks out the latest source code from an appropriate repository to specified directoryMethods inherited from interface com.atlassian.bamboo.repository.BranchAwareRepository
getVcsBranch, setVcsBranchMethods inherited from interface com.atlassian.bamboo.v2.build.BuildConfigurationAwarePlugin
addDefaultValues, isConfigurationMissing, prepareConfigObject, validateMethods inherited from interface com.atlassian.bamboo.v2.build.ConfigurablePlugin
customizeBuildRequirements, removeBuildRequirementsMethods inherited from interface com.atlassian.bamboo.fieldvalue.ConvertibleFromConfig
populateFromConfig, toConfigurationMethods inherited from interface com.atlassian.bamboo.v2.build.repository.CustomSourceDirectoryAwareRepository
retrieveSourceCodeMethods inherited from interface com.atlassian.bamboo.utils.DescriptionProvider
getDescriptionMethods inherited from interface com.atlassian.bamboo.plugin.InitablePluginModule
initMethods inherited from interface com.atlassian.bamboo.v2.build.RenderableBuildConfiguration
getEditHtml, getViewHtmlMethods inherited from interface com.atlassian.bamboo.repository.Repository
getHost, getKey, getLocationIdentifier, getMinimalEditHtml, getName, getShortKeyMethods inherited from interface com.atlassian.bamboo.v2.build.repository.RepositoryV2
collectChangesSinceLastBuild, getSourceCodeDirectory, isRepositoryDifferent
-
Method Details
-
mergeWorkspaceWith
boolean mergeWorkspaceWith(@NotNull @NotNull BuildContext buildContext, @NotNull @NotNull File checkoutDirectory, @NotNull @NotNull String targetRevision) throws RepositoryException Merges a workspace located in checkout directory with the target revision.- Parameters:
buildContext- the build context of build doing the mergecheckoutDirectory- the workspace to use for mergetargetRevision- the revision to merge with- Returns:
- true if the result of the merge would result in a non-empty commit
- Throws:
RepositoryException
-
isMergingSupported
boolean isMergingSupported() -
retrieveSourceCode
@NotNull @NotNull String retrieveSourceCode(@NotNull @NotNull BuildContext buildContext, @Nullable @Nullable String vcsRevisionKey, @NotNull @NotNull File sourceDirectory, int depth) throws RepositoryException Checks out the latest source code from an appropriate repository to specified directory- Parameters:
buildContext-vcsRevisionKey- - may be null if you want latest codesourceDirectory- - directory to checkout todepth- - how many historical revisions we'd like to check out (-1 means all revisions)- Returns:
- vcsRevisionKey - the revision
- Throws:
RepositoryException
-
getBranchIntegrationEditHtml
Gives repository a chance to display a HTML on the UI when user is enabling "Branch Integration" feature- Returns:
- HTML snippet to be displayed on UI
-