Class BitbucketRepository
java.lang.Object
com.atlassian.bamboo.v2.build.BaseBuildConfigurationAwarePlugin
com.atlassian.bamboo.v2.build.BaseConfigurablePlugin
com.atlassian.bamboo.repository.AbstractRepository
com.atlassian.bamboo.repository.AbstractStandaloneRepository
com.atlassian.bamboo.plugins.bitbucket.BitbucketRepository
- All Implemented Interfaces:
SharedCredentialDepender,ConvertibleFromConfig,InitablePluginModule,GitRepositoryFacade,AdvancedConfigurationAwareRepository,BranchAwareRepository,BranchDetectionCapableRepository,BranchInformationProvider,BranchMergingAwareRepository,CachingAwareRepository,CustomVariableProviderRepository,DeploymentAwareRepository,FilterChangesetAwareRepository,IncludeExcludeAwareRepository,OnceOffCapableRepository,PushCapableRepository,QuietPeriodAwareRepository,Repository,ScmTypePublishingRepository,StandaloneRepository,TestConnectionAwareRepository,EditActionAwareRepository,UniqueRevisionIdRepository,DescriptionProvider,NameProvider,BambooPluginModule,BuildConfigurationAwarePlugin,ConfigurablePlugin,RenderableBuildConfiguration,CustomSourceDirectoryAwareRepository,RepositoryV2,RequirementsAwareRepository,Serializable
public class BitbucketRepository
extends AbstractStandaloneRepository
implements BranchInformationProvider, BranchMergingAwareRepository, CachingAwareRepository, CustomSourceDirectoryAwareRepository, CustomVariableProviderRepository, DeploymentAwareRepository, GitRepositoryFacade, PushCapableRepository, RequirementsAwareRepository, UniqueRevisionIdRepository, ScmTypePublishingRepository, TestConnectionAwareRepository, SharedCredentialDepender, EditActionAwareRepository
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.atlassian.bamboo.repository.CachingAwareRepository
CachingAwareRepository.CachableOperation -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class com.atlassian.bamboo.repository.AbstractRepository
administrationConfigurationAccessor, BUILD_TRIGGER_IP, buildDirectoryManager, buildLoggerManager, customVariableContext, featureManager, REPO_PREFIX, repositoryModuleDescriptor, templateRenderer, textProviderFields inherited from class com.atlassian.bamboo.v2.build.BaseBuildConfigurationAwarePlugin
moduleDescriptorFields inherited from interface com.atlassian.bamboo.repository.FilterChangesetAwareRepository
CHANGESET_FILTER_PATTERN_REGEX, MAVEN_RELEASE_PLUGIN_EXCLUSION_PATTERNFields inherited from interface com.atlassian.bamboo.plugins.git.GitRepositoryFacade
GIT_REPOSITORIES_OF_PLANFields inherited from interface com.atlassian.bamboo.repository.IncludeExcludeAwareRepository
FILTER_PATTERN_EXCLUDE, FILTER_PATTERN_INCLUDE, FILTER_PATTERN_NONE, FILTER_PATTERN_OPTION, FILTER_PATTERN_REGEXFields inherited from interface com.atlassian.bamboo.repository.Repository
SELECTED_REPOSITORY, UNKNOWN_HOSTFields inherited from interface com.atlassian.bamboo.repository.TestConnectionAwareRepository
HOST_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDefaultValues(@NotNull BuildConfiguration buildConfiguration) Extension point for adding default values to the form forRenderableBuildConfiguration.getEditHtml(com.atlassian.bamboo.ww2.actions.build.admin.create.BuildConfiguration, com.atlassian.bamboo.plan.Plan)voidbeforeEditPageRendering(@NotNull org.apache.commons.configuration.HierarchicalConfiguration configuration) Action to be taken before rendering the edit page.beforeSave(@NotNull org.apache.commons.configuration.HierarchicalConfiguration configuration) Action to be taken before repository is saved from the UI.@NotNull BuildRepositoryChangescollectChangesForRevision(@NotNull PlanKey planKey, @NotNull String targetRevision) Collects the changes for the targetRevision.@NotNull BuildRepositoryChangescollectChangesSinceLastBuild(@NotNull String planKey, @Nullable String lastVcsRevisionKey) Collects the changes since the lastVcsRevisionKey.@NotNull StringPerform a commit (dvcs commit).@NotNull List<NameValuePair>getCacheId(@NotNull CachingAwareRepository.CachableOperation cachableOperation) Cache id has to fulfill the following: Given two Repository objects A and B, returning equal CacheId (in terms of equals()) and a cachable operation foo(), in the following sequence of calls made in a short time period: 1.Return a map containing name->value mapping of the variables.Retrieve the commit that created the Branch.@Nullable GitRepositorygetHost()What's the repository server hostRetrieve last commit on the branch set on this Repository.@NotNull StringgetName()The display name for the repository typegetOpenBranches(@Nullable String context) Setof open branches that are discovered in the repository.@Nullable StringgetOwner()@Nullable String@NotNull List<NameValuePair>@NotNull List<NameValuePair>@Nullable LongReturn a map containing name->value mapping of the plan repository format variables.@NotNull List<NameValuePair>@NotNull Set<Requirement>getScm()Get a string representing the name of the repository type.Returns a list of shared credential ids used by this class.@NotNull List<NameValuePair>@NotNull List<NameValuePair>@Nullable String@NotNull VcsBranchbooleanisCachingSupportedFor(@NotNull CachingAwareRepository.CachableOperation cachableOperation) booleanbooleanbooleanisRepositoryDifferent(@NotNull Repository repository) Checks if the current repo is the same as the given repositorybooleanbooleanmergeWorkspaceWith(@NotNull BuildContext buildContext, @NotNull File checkoutDirectory, @NotNull String targetRevision) Merges a workspace located in checkout directory with the target revision.voidpopulateFromConfig(@NotNull org.apache.commons.configuration.HierarchicalConfiguration config) Update the current object with data in theHierarchicalConfigurationvoidprepareConfigObject(@NotNull BuildConfiguration buildConfiguration) Do any preprocessing work before validation occurs.voidpushRevision(@NotNull File sourceDirectory, @Nullable String vcsRevisionKey) Push the specified revision to the remote directory.@NotNull StringretrieveSourceCode(@NotNull BuildContext buildContext, @Nullable String vcsRevisionKey, @NotNull File sourceDirectory) Checks out the latest source code from an appropriate repository to specified directory@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 directoryvoidsetBitbucketApiService(BitbucketApiService bitbucketApiService) voidsetBitbucketValidationHelper(BitbucketValidationHelper bitbucketValidationHelper) voidsetCapabilityContext(CapabilityContext capabilityContext) voidsetCredentialsAccessor(CredentialsAccessor credentialsAccessor) voidsetI18nResolver(com.atlassian.sal.api.message.I18nResolver i18nResolver) voidsetRepositoryHelperService(BitbucketRepositoryHelperService repositoryHelperService) voidsetRepositoryManager(RepositoryManager repositoryManager) voidsetVcsBranch(@NotNull VcsBranch branch) Set and prepare the repository for using an arbitrary branch.@NotNull ErrorCollectiontestConnection(long timeout, @NotNull TimeUnit unit) Test connection to the repository within the given timeout.@NotNull org.apache.commons.configuration.HierarchicalConfigurationGenerate aHierarchicalConfigurationfrom the current state of the objectbooleanIf Bamboo generic detection polling should be used for this repository@NotNull ErrorCollectionvalidate(@NotNull BuildConfiguration configuration) Validates the properties in theBuildConfigurationobject.@NotNull ErrorCollectionvalidateForConnectionTesting(@NotNull BuildConfiguration configuration) A method similar toBuildConfigurationAwarePlugin.validate(BuildConfiguration)used to validate repository configuration before connection testing.Methods inherited from class com.atlassian.bamboo.repository.AbstractStandaloneRepository
getAdvancedEditHtml, getAdvancedViewHtml, getEditHtml, getViewHtml, getViewHtmlMethods inherited from class com.atlassian.bamboo.repository.AbstractRepository
customizeBuildRequirements, getAdvancedEditHtml, getAdvancedViewHtml, getBranchIntegrationEditHtml, getChangesetFilterPatternRegex, getDefaultTriggerModule, getDescription, getEditHtml, getFilterFilePatternOption, getFilterFilePatternRegex, getKey, getLocationIdentifier, getMavenPomCheckoutAccessEditHtml, getMaxCommitsToReturn, getMaxRetries, getMinimalEditHtml, getPollingTriggerModule, getQuietPeriod, getShortKey, getSourceCodeDirectory, getSystemWideExclusionPatterns, getViewHtml, getWorkingDirectory, init, isAdvancedOptionEnabled, isQuietPeriodEnabled, isWorkspaceEmpty, removeBuildRequirements, setAdministrationConfigurationAccessor, setBuildDirectoryManager, setBuildLoggerManager, setChangesetFilterPatternRegex, setCustomVariableContext, setFeatureManager, setFilterFilePatternOption, setFilterFilePatternRegex, setTemplateRenderer, setTextProvider, setWorkingDir, substituteString, toMergeCapableRepositoryMethods inherited from class com.atlassian.bamboo.v2.build.BaseBuildConfigurationAwarePlugin
getTemplateRenderer, populateContextForEdit, populateContextForViewMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.bamboo.repository.BranchMergingAwareRepository
getBranchIntegrationEditHtmlMethods inherited from interface com.atlassian.bamboo.v2.build.BuildConfigurationAwarePlugin
isConfigurationMissingMethods inherited from interface com.atlassian.bamboo.v2.build.ConfigurablePlugin
customizeBuildRequirements, removeBuildRequirementsMethods 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
getKey, getLocationIdentifier, getMinimalEditHtml, getShortKeyMethods inherited from interface com.atlassian.bamboo.v2.build.repository.RepositoryV2
getSourceCodeDirectory
-
Field Details
-
REPOSITORY_BITBUCKET_ACCESS_LEVEL
- See Also:
-
REPOSITORY_BITBUCKET_AUTHENTICATION_TYPE
- See Also:
-
REPOSITORY_BITBUCKET_OWNER
- See Also:
-
REPOSITORY_BITBUCKET_USERNAME
- See Also:
-
REPOSITORY_BITBUCKET_PASSWORD
- See Also:
-
REPOSITORY_BITBUCKET_PASSWORD_CREDENTIALS_SOURCE
- See Also:
-
REPOSITORY_BITBUCKET_PASSWORD_SHARED_CREDENTIALS_ID
- See Also:
-
REPOSITORY_BITBUCKET_PASSWORD_SHARED_CREDENTIALS_DELETED
- See Also:
-
REPOSITORY_BITBUCKET_REPOSITORY
- See Also:
-
REPOSITORY_BITBUCKET_SSH_CREDENTIALS_SOURCE
- See Also:
-
REPOSITORY_BITBUCKET_SSH_SHARED_CREDENTIALS_ID
- See Also:
-
REPOSITORY_BITBUCKET_SSH_SHARED_CREDENTIALS_DELETED
- See Also:
-
REPOSITORY_BITBUCKET_SSH_KEY
- See Also:
-
REPOSITORY_BITBUCKET_SSH_PASSPHRASE
- See Also:
-
REPOSITORY_BITBUCKET_BRANCH
- See Also:
-
REPOSITORY_BITBUCKET_COMMAND_TIMEOUT
- See Also:
-
REPOSITORY_BITBUCKET_VERBOSE_LOGS
- See Also:
-
REPOSITORY_BITBUCKET_FETCH_WHOLE_REPOSITORY
- See Also:
-
REPOSITORY_BITBUCKET_GIT_USE_SHALLOW_CLONES
- See Also:
-
REPOSITORY_BITBUCKET_GIT_LFS
- See Also:
-
REPOSITORY_BITBUCKET_GIT_USE_SUBMODULES
- See Also:
-
REPOSITORY_BITBUCKET_GIT_USE_REMOTE_AGENT_CACHE
- See Also:
-
REPOSITORY_BITBUCKET_TEMPORARY_PASSWORD
- See Also:
-
REPOSITORY_BITBUCKET_PASSWORD_CHANGE
- See Also:
-
REPOSITORY_BITBUCKET_TEMPORARY_SSH_PASSPHRASE
- See Also:
-
REPOSITORY_BITBUCKET_TEMPORARY_SSH_PASSPHRASE_CHANGE
- See Also:
-
REPOSITORY_BITBUCKET_TEMPORARY_SSH_KEY_FROM_FILE
- See Also:
-
REPOSITORY_BITBUCKET_TEMPORARY_SSH_KEY_CHANGE
- See Also:
-
REPOSITORY_BITBUCKET_WEBHOOKS_ENABLED
- See Also:
-
-
Constructor Details
-
BitbucketRepository
public BitbucketRepository()
-
-
Method Details
-
getName
Description copied from interface:RepositoryThe display name for the repository type- Specified by:
getNamein interfaceDescriptionProvider- Specified by:
getNamein interfaceNameProvider- Specified by:
getNamein interfaceRepository
-
getScm
Description copied from interface:ScmTypePublishingRepositoryGet a string representing the name of the repository type. (e.g. "git")- Specified by:
getScmin interfaceScmTypePublishingRepository- Returns:
- a string representing the name of the repository type. (e.g. "git")
-
getHost
Description copied from interface:RepositoryWhat's the repository server host- Specified by:
getHostin interfaceRepository- Returns:
- The host!
-
isRepositoryDifferent
Description copied from interface:RepositoryV2Checks if the current repo is the same as the given repository- Specified by:
isRepositoryDifferentin interfaceRepositoryV2- Parameters:
repository- to compare against- Returns:
- true of repositories are different, false if the same;
-
addDefaultValues
Description copied from interface:BuildConfigurationAwarePluginExtension point for adding default values to the form forRenderableBuildConfiguration.getEditHtml(com.atlassian.bamboo.ww2.actions.build.admin.create.BuildConfiguration, com.atlassian.bamboo.plan.Plan)- Specified by:
addDefaultValuesin interfaceBuildConfigurationAwarePlugin- Overrides:
addDefaultValuesin classAbstractRepository- Parameters:
buildConfiguration- -
-
beforeEditPageRendering
public void beforeEditPageRendering(@NotNull @NotNull org.apache.commons.configuration.HierarchicalConfiguration configuration) Description copied from interface:EditActionAwareRepositoryAction to be taken before rendering the edit page. Configuration can be modified by this method. Example use is verifying configuration so that proper warnings can be displayed before user takes any action.- Specified by:
beforeEditPageRenderingin interfaceEditActionAwareRepository- Parameters:
configuration- configuration to be loaded into the UI
-
beforeSave
public ErrorCollection beforeSave(@NotNull @NotNull org.apache.commons.configuration.HierarchicalConfiguration configuration) Description copied from interface:EditActionAwareRepositoryAction to be taken before repository is saved from the UI. The method is called after the validate() method and only if validation is successful. If this method returns with error the configuration is not saved. Configuration can be modified by this method and the changes will be persisted.- Specified by:
beforeSavein interfaceEditActionAwareRepository- Returns:
- collection of error messages. Should be empty if call is successful.
-
prepareConfigObject
Description copied from interface:BuildConfigurationAwarePluginDo any preprocessing work before validation occurs. For repository, builder and web repository plugins this will only be called if the plugin is select by the user.- Specified by:
prepareConfigObjectin interfaceBuildConfigurationAwarePlugin- Overrides:
prepareConfigObjectin classBaseBuildConfigurationAwarePlugin- Parameters:
buildConfiguration- -
-
populateFromConfig
public void populateFromConfig(@NotNull @NotNull org.apache.commons.configuration.HierarchicalConfiguration config) Description copied from interface:ConvertibleFromConfigUpdate the current object with data in theHierarchicalConfiguration- Specified by:
populateFromConfigin interfaceConvertibleFromConfig- Overrides:
populateFromConfigin classAbstractRepository
-
toConfiguration
@NotNull public @NotNull org.apache.commons.configuration.HierarchicalConfiguration toConfiguration()Description copied from interface:ConvertibleFromConfigGenerate aHierarchicalConfigurationfrom the current state of the object- Specified by:
toConfigurationin interfaceConvertibleFromConfig- Overrides:
toConfigurationin classAbstractRepository- Returns:
- Always returns an
HierarchicalConfiguration. Never null
-
validateForConnectionTesting
@NotNull public @NotNull ErrorCollection validateForConnectionTesting(@NotNull @NotNull BuildConfiguration configuration) Description copied from interface:TestConnectionAwareRepositoryA method similar toBuildConfigurationAwarePlugin.validate(BuildConfiguration)used to validate repository configuration before connection testing. This method may be more relaxed than normal validation. Additionally, different error messages may be displayed (e.g. related to impossibility of transferring files).- Specified by:
validateForConnectionTestingin interfaceTestConnectionAwareRepository- Parameters:
configuration- repository configuration to validate- Returns:
- validation errors
-
validate
@NotNull public @NotNull ErrorCollection validate(@NotNull @NotNull BuildConfiguration configuration) Description copied from interface:BuildConfigurationAwarePluginValidates the properties in theBuildConfigurationobject. The name of the properties match those passed in through the form fragments inRenderableBuildConfiguration.getEditHtml(com.atlassian.bamboo.ww2.actions.build.admin.create.BuildConfiguration, com.atlassian.bamboo.plan.Plan)template.- Specified by:
validatein interfaceBuildConfigurationAwarePlugin- Overrides:
validatein classAbstractRepository- Parameters:
configuration- -- Returns:
ErrorCollectionkeyed by the field name.
-
getPasswordCredentialsSources
-
getSshCredentialsSources
-
getAccessLevels
-
getPrivateRepositoryAuthenticationTypes
-
collectChangesForRevision
@NotNull public @NotNull BuildRepositoryChanges collectChangesForRevision(@NotNull @NotNull PlanKey planKey, @NotNull @NotNull String targetRevision) throws RepositoryException Description copied from interface:OnceOffCapableRepositoryCollects the changes for the targetRevision. This method is called only on server side (never on agent).- Specified by:
collectChangesForRevisionin interfaceOnceOffCapableRepository- Overrides:
collectChangesForRevisionin classAbstractRepository- Returns:
- A build changes object with the appropriate build changes (that is - with the single commit data relevant for targetRevision)
- Throws:
RepositoryException- if something goes wrong
-
collectChangesSinceLastBuild
@NotNull public @NotNull BuildRepositoryChanges collectChangesSinceLastBuild(@NotNull @NotNull String planKey, @Nullable @Nullable String lastVcsRevisionKey) throws RepositoryException Description copied from interface:RepositoryV2Collects the changes since the lastVcsRevisionKey. This method is called only on server side (never on agent).- Specified by:
collectChangesSinceLastBuildin interfaceRepositoryV2lastVcsRevisionKey- 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
-
retrieveSourceCode
@NotNull public @NotNull String retrieveSourceCode(@NotNull @NotNull BuildContext buildContext, @Nullable @Nullable String vcsRevisionKey, @NotNull @NotNull File sourceDirectory) throws RepositoryException Description copied from interface:CustomSourceDirectoryAwareRepositoryChecks out the latest source code from an appropriate repository to specified directory- Specified by:
retrieveSourceCodein interfaceCustomSourceDirectoryAwareRepositoryvcsRevisionKey- - may be null if you want latest codesourceDirectory- - directory to checkout to- Returns:
- vcsRevisionKey - the revision
- Throws:
RepositoryException
-
retrieveSourceCode
@NotNull public @NotNull String retrieveSourceCode(@NotNull @NotNull BuildContext buildContext, @Nullable @Nullable String vcsRevisionKey, @NotNull @NotNull File sourceDirectory, int depth) throws RepositoryException Description copied from interface:BranchMergingAwareRepositoryChecks out the latest source code from an appropriate repository to specified directory- Specified by:
retrieveSourceCodein interfaceBranchMergingAwareRepositoryvcsRevisionKey- - 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
-
testConnection
@NotNull public @NotNull ErrorCollection testConnection(long timeout, @NotNull @NotNull TimeUnit unit) Description copied from interface:TestConnectionAwareRepositoryTest connection to the repository within the given timeout. The method should stop executing after the given time elapses.- Specified by:
testConnectionin interfaceTestConnectionAwareRepository- Parameters:
timeout- the maximum time to waitunit- the time unit of the timeout argument- Returns:
- Errors discovered during testing connection. Empty error collection should be returned if connection was successful. The errors should be translated to error messages, rather than field errors. Field errors are used by Bamboo to handle special cases.
-
getRequirements
- Specified by:
getRequirementsin interfaceRequirementsAwareRepository
-
setBitbucketApiService
-
setRepositoryHelperService
-
setI18nResolver
public void setI18nResolver(com.atlassian.sal.api.message.I18nResolver i18nResolver) -
setRepositoryManager
-
setCredentialsAccessor
-
setBitbucketValidationHelper
-
getCapabilityContext
-
setCapabilityContext
-
getRealRepositoryUrl
-
isVerboseLogs
public boolean isVerboseLogs() -
isFetchWholeRepository
public boolean isFetchWholeRepository() -
getOptionDescription
-
getCacheId
public CacheId getCacheId(@NotNull @NotNull CachingAwareRepository.CachableOperation cachableOperation) Description copied from interface:CachingAwareRepositoryCache id has to fulfill the following: Given two Repository objects A and B, returning equal CacheId (in terms of equals()) and a cachable operation foo(), in the following sequence of calls made in a short time period: 1. A::foo() 2. B::foo() 3. A::foo() the result of B::foo() should be the same as either the first or the second call to A::foo().- Specified by:
getCacheIdin interfaceCachingAwareRepository- Returns:
- the cache id of repository, null if the supplied operation cannot be cached
-
isCachingSupportedFor
public boolean isCachingSupportedFor(@NotNull @NotNull CachingAwareRepository.CachableOperation cachableOperation) - Specified by:
isCachingSupportedForin interfaceCachingAwareRepository- Returns:
- true if the repository supports generation of CacheIds for a given operation
-
getOpenBranches
@NotNull public @NotNull List<VcsBranch> getOpenBranches(@Nullable @Nullable String context) throws RepositoryException Description copied from interface:BranchDetectionCapableRepositorySetof open branches that are discovered in the repository. Returns empty collection if no branches at all (can that happen?). Used for monitoring repositories for new branches. An open branch is a branch that is considered 'open' by underlying VCS - it has nothing to do with the actual development on that branch (recent commits or so).- Specified by:
getOpenBranchesin interfaceBranchDetectionCapableRepository- Returns:
Listof branch names. May be empty.- Throws:
RepositoryException
-
getOwner
-
getUsername
-
getPassword
-
getAccessLevel
-
authenticationType
-
getPasswordCredentialsSource
-
getSshCredentialsSource
-
getRepositoryOwner
-
getRepositorySlug
-
getVcsBranch
- Specified by:
getVcsBranchin interfaceBranchAwareRepository- Returns:
- the branch being used currently by this repository.
-
setVcsBranch
Description copied from interface:BranchAwareRepositorySet and prepare the repository for using an arbitrary branch. Generally the subsequent getVcsBranch should return the same branch name.- Specified by:
setVcsBranchin interfaceBranchAwareRepository
-
getFirstCommit
Description copied from interface:BranchDetectionCapableRepositoryRetrieve the commit that created the Branch.- Specified by:
getFirstCommitin interfaceBranchDetectionCapableRepository- Returns:
- the first commit to the branch
- Throws:
RepositoryException
-
getLastCommit
Description copied from interface:BranchDetectionCapableRepositoryRetrieve last commit on the branch set on this Repository. Method is used by Chain Branch automatic expiry. If this method returns null Chain Branch is not expired.- Specified by:
getLastCommitin interfaceBranchDetectionCapableRepository- Returns:
- the last commit or null if N/A
- Throws:
RepositoryException
-
mergeWorkspaceWith
public boolean mergeWorkspaceWith(@NotNull @NotNull BuildContext buildContext, @NotNull @NotNull File checkoutDirectory, @NotNull @NotNull String targetRevision) throws RepositoryException Description copied from interface:BranchMergingAwareRepositoryMerges a workspace located in checkout directory with the target revision.- Specified by:
mergeWorkspaceWithin interfaceBranchMergingAwareRepository- 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
public boolean isMergingSupported()- Specified by:
isMergingSupportedin interfaceBranchMergingAwareRepository
-
pushRevision
public void pushRevision(@NotNull @NotNull File sourceDirectory, @Nullable @Nullable String vcsRevisionKey) throws RepositoryException Description copied from interface:PushCapableRepositoryPush the specified revision to the remote directory. Throws RepositoryException when failed due to connection problems or similar.- Specified by:
pushRevisionin interfacePushCapableRepository- Parameters:
sourceDirectory- - the working directory of the repository we want to push fromvcsRevisionKey- - the revisionKey (usually a branch name) to push- Throws:
RepositoryException- - when something goes wrong
-
commit
@NotNull public @NotNull String commit(@NotNull @NotNull File sourceDirectory, @NotNull @NotNull String message) throws RepositoryException Description copied from interface:PushCapableRepositoryPerform a commit (dvcs commit).- Specified by:
commitin interfacePushCapableRepository- Parameters:
sourceDirectory- - which workspace directory to perform the commitmessage- - what message use for commit- Returns:
- Created commit revision key
- Throws:
RepositoryException- - when something goes wrong
-
usePollingForBranchDetection
public boolean usePollingForBranchDetection()Description copied from interface:BranchInformationProviderIf Bamboo generic detection polling should be used for this repository- Specified by:
usePollingForBranchDetectionin interfaceBranchInformationProvider- Returns:
-
getGitRepository
- Specified by:
getGitRepositoryin interfaceGitRepositoryFacade
-
getCustomVariables
Description copied from interface:CustomVariableProviderRepositoryReturn a map containing name->value mapping of the variables.Null values will be filtered out so it's safe to put them in the map.
- Specified by:
getCustomVariablesin interfaceCustomVariableProviderRepository- Returns:
- Map with variable substitutions
-
getPlanRepositoryVariables
Description copied from interface:CustomVariableProviderRepositoryReturn a map containing name->value mapping of the plan repository format variables.Null values will be filtered out so it's safe to put them in the map.
- Specified by:
getPlanRepositoryVariablesin interfaceCustomVariableProviderRepository- Returns:
- Map with variable substitutions
-