|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.hg.BitbucketRepository
public class BitbucketRepository
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.atlassian.bamboo.repository.CachingAwareRepository |
---|
CachingAwareRepository.CachableOperation |
Field Summary | |
---|---|
static java.lang.String |
REPOSITORY_BITBUCKET_BRANCH
|
static java.lang.String |
REPOSITORY_BITBUCKET_COMMAND_TIMEOUT
|
static java.lang.String |
REPOSITORY_BITBUCKET_GIT_USE_SHALLOW_CLONES
|
static java.lang.String |
REPOSITORY_BITBUCKET_GIT_USE_SUBMODULES
|
static java.lang.String |
REPOSITORY_BITBUCKET_PASSWORD
|
static java.lang.String |
REPOSITORY_BITBUCKET_REPOSITORY
|
static java.lang.String |
REPOSITORY_BITBUCKET_SCM
|
static java.lang.String |
REPOSITORY_BITBUCKET_USERNAME
|
static java.lang.String |
REPOSITORY_BITBUCKET_VERBOSE_LOGS
|
Fields inherited from class com.atlassian.bamboo.repository.AbstractRepository |
---|
BUILD_TRIGGER_IP, buildDirectoryManager, buildLoggerManager, customVariableContext, featureManager, REPO_PREFIX, repositoryModuleDescriptor, templateRenderer, textProvider |
Fields inherited from class com.atlassian.bamboo.v2.build.BaseBuildConfigurationAwarePlugin |
---|
moduleDescriptor |
Fields inherited from interface com.atlassian.bamboo.repository.IncludeExcludeAwareRepository |
---|
FILTER_PATTERN_EXCLUDE, FILTER_PATTERN_INCLUDE, FILTER_PATTERN_OPTION, FILTER_PATTERN_REGEX |
Fields inherited from interface com.atlassian.bamboo.repository.FilterChangesetAwareRepository |
---|
CHANGESET_FILTER_PATTERN_REGEX, MAVEN_RELEASE_PLUGIN_EXCLUSION_PATTERN |
Constructor Summary | |
---|---|
BitbucketRepository()
|
Method Summary | |
---|---|
void |
addDefaultValues(BuildConfiguration buildConfiguration)
Extension point for adding default values to the form for RenderableBuildConfiguration.getEditHtml(com.atlassian.bamboo.ww2.actions.build.admin.create.BuildConfiguration, com.atlassian.bamboo.plan.Plan) |
BuildRepositoryChanges |
collectChangesSinceLastBuild(java.lang.String planKey,
java.lang.String lastVcsRevisionKey)
Collects the changes since the lastVcsRevisionKey. |
java.lang.String |
commit(java.io.File sourceDirectory,
java.lang.String message)
Perform a commit (dvcs commit). |
CacheId |
getCacheId(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. |
CapabilityContext |
getCapabilityContext()
|
java.lang.String |
getEncryptedPassword()
|
CommitContext |
getFirstCommit()
Retrieve the commit that created the Branch. |
java.lang.String |
getHost()
What's the repository server host |
CommitContext |
getLastCommit()
Retrieve last commit on the branch set on this Repository. |
java.lang.String |
getName()
The display name for the repository type |
java.util.List<VcsBranch> |
getOpenBranches(java.lang.String context)
Set of open branches that are discovered in the repository. |
java.lang.String |
getOptionDescription()
|
java.lang.String |
getRealRepositoryUrl()
|
java.util.Set<Requirement> |
getRequirements()
|
java.lang.String |
getScm()
|
java.lang.String |
getUsername()
|
VcsBranch |
getVcsBranch()
|
boolean |
isCachingSupportedFor(CachingAwareRepository.CachableOperation cachableOperation)
|
boolean |
isMergingSupported()
|
boolean |
isRepositoryDifferent(Repository repository)
Checks if the current repo is the same as the given repository |
boolean |
isVerboseLogs()
|
boolean |
mergeWorkspaceWith(BuildContext buildContext,
java.io.File checkoutDirectory,
java.lang.String targetRevision)
Merges a workspace located in checkout directory with the target revision. |
void |
populateFromConfig(org.apache.commons.configuration.HierarchicalConfiguration config)
Update the current object with data in the HierarchicalConfiguration |
void |
prepareConfigObject(BuildConfiguration buildConfiguration)
Do any preprocessing work before validation occurs. |
void |
pushRevision(java.io.File sourceDirectory,
java.lang.String vcsRevisionKey)
Push the specified revision to the remote directory. |
java.lang.String |
retrieveSourceCode(BuildContext buildContext,
java.lang.String vcsRevisionKey,
java.io.File sourceDirectory)
Checks out the latest source code from an appropriate repository to specified directory |
java.lang.String |
retrieveSourceCode(BuildContext buildContext,
java.lang.String vcsRevisionKey,
java.io.File sourceDirectory,
int depth)
Checks out the latest source code from an appropriate repository to specified directory |
void |
setBitbucketApiService(BitbucketApiService bitbucketApiService)
|
void |
setCapabilityContext(CapabilityContext capabilityContext)
|
void |
setEncryptionService(EncryptionService encryptionService)
|
void |
setI18nResolver(com.atlassian.sal.api.message.I18nResolver i18nResolver)
|
void |
setRepositoryHelperService(BitbucketRepositoryHelperService repositoryHelperService)
|
void |
setRepositoryManager(RepositoryManager repositoryManager)
|
void |
setVcsBranch(VcsBranch branch)
Set and prepare the repository for using an arbitrary branch. |
org.apache.commons.configuration.HierarchicalConfiguration |
toConfiguration()
Generate a HierarchicalConfiguration from the current state of the object |
ErrorCollection |
validate(BuildConfiguration buildConfiguration)
Validates the properties in the BuildConfiguration object. |
Methods inherited from class com.atlassian.bamboo.repository.AbstractStandaloneRepository |
---|
getAdvancedEditHtml, getAdvancedViewHtml, getEditHtml, getViewHtml |
Methods inherited from class com.atlassian.bamboo.v2.build.BaseConfigurablePlugin |
---|
customizeBuildRequirements, removeBuildRequirements |
Methods inherited from class com.atlassian.bamboo.v2.build.BaseBuildConfigurationAwarePlugin |
---|
isConfigurationMissing, populateContextForEdit, populateContextForView |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.atlassian.bamboo.repository.BranchMergingAwareRepository |
---|
getBranchIntegrationEditHtml |
Field Detail |
---|
public static final java.lang.String REPOSITORY_BITBUCKET_USERNAME
public static final java.lang.String REPOSITORY_BITBUCKET_PASSWORD
public static final java.lang.String REPOSITORY_BITBUCKET_REPOSITORY
public static final java.lang.String REPOSITORY_BITBUCKET_SCM
public static final java.lang.String REPOSITORY_BITBUCKET_BRANCH
public static final java.lang.String REPOSITORY_BITBUCKET_COMMAND_TIMEOUT
public static final java.lang.String REPOSITORY_BITBUCKET_VERBOSE_LOGS
public static final java.lang.String REPOSITORY_BITBUCKET_GIT_USE_SHALLOW_CLONES
public static final java.lang.String REPOSITORY_BITBUCKET_GIT_USE_SUBMODULES
Constructor Detail |
---|
public BitbucketRepository()
Method Detail |
---|
@NotNull public java.lang.String getName()
Repository
getName
in interface Repository
getName
in interface DescriptionProvider
getName
in interface NameProvider
public java.lang.String getScm()
public java.lang.String getHost()
Repository
getHost
in interface Repository
public boolean isRepositoryDifferent(@NotNull Repository repository)
RepositoryV2
isRepositoryDifferent
in interface RepositoryV2
repository
- to compare against
public void addDefaultValues(@NotNull BuildConfiguration buildConfiguration)
BuildConfigurationAwarePlugin
RenderableBuildConfiguration.getEditHtml(com.atlassian.bamboo.ww2.actions.build.admin.create.BuildConfiguration, com.atlassian.bamboo.plan.Plan)
addDefaultValues
in interface BuildConfigurationAwarePlugin
addDefaultValues
in class AbstractRepository
buildConfiguration
- - @NotNullpublic void prepareConfigObject(@NotNull BuildConfiguration buildConfiguration)
BuildConfigurationAwarePlugin
prepareConfigObject
in interface BuildConfigurationAwarePlugin
prepareConfigObject
in class BaseBuildConfigurationAwarePlugin
buildConfiguration
- - @NotNullpublic void populateFromConfig(@NotNull org.apache.commons.configuration.HierarchicalConfiguration config)
ConvertibleFromConfig
HierarchicalConfiguration
populateFromConfig
in interface ConvertibleFromConfig
populateFromConfig
in class AbstractRepository
@NotNull public org.apache.commons.configuration.HierarchicalConfiguration toConfiguration()
ConvertibleFromConfig
HierarchicalConfiguration
from the current state of the object
toConfiguration
in interface ConvertibleFromConfig
toConfiguration
in class AbstractRepository
HierarchicalConfiguration
. Never null@NotNull public ErrorCollection validate(@NotNull BuildConfiguration buildConfiguration)
BuildConfigurationAwarePlugin
BuildConfiguration
object. The name of the properties match those passed
in through the form fragments in RenderableBuildConfiguration.getEditHtml(com.atlassian.bamboo.ww2.actions.build.admin.create.BuildConfiguration, com.atlassian.bamboo.plan.Plan)
template.
validate
in interface BuildConfigurationAwarePlugin
validate
in class AbstractRepository
buildConfiguration
- - @NotNull
ErrorCollection
keyed by the field name. @NotNull@NotNull public BuildRepositoryChanges collectChangesSinceLastBuild(@NotNull java.lang.String planKey, @Nullable java.lang.String lastVcsRevisionKey) throws RepositoryException
RepositoryV2
collectChangesSinceLastBuild
in interface RepositoryV2
lastVcsRevisionKey
- can be null, if null you should ensure the correct vcsrevisionkey is returned in the BuildChanges object.
RepositoryException
- if something goes wrong@NotNull public java.lang.String retrieveSourceCode(@NotNull BuildContext buildContext, @Nullable java.lang.String vcsRevisionKey, @NotNull java.io.File sourceDirectory) throws RepositoryException
CustomSourceDirectoryAwareRepository
retrieveSourceCode
in interface CustomSourceDirectoryAwareRepository
vcsRevisionKey
- - may be null if you want latest codesourceDirectory
- - directory to checkout to
RepositoryException
@NotNull public java.lang.String retrieveSourceCode(@NotNull BuildContext buildContext, @Nullable java.lang.String vcsRevisionKey, @NotNull java.io.File sourceDirectory, int depth) throws RepositoryException
BranchMergingAwareRepository
retrieveSourceCode
in interface BranchMergingAwareRepository
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)
RepositoryException
public java.util.Set<Requirement> getRequirements()
getRequirements
in interface RequirementsAwareRepository
public void setBitbucketApiService(BitbucketApiService bitbucketApiService)
public void setRepositoryHelperService(BitbucketRepositoryHelperService repositoryHelperService)
public void setI18nResolver(com.atlassian.sal.api.message.I18nResolver i18nResolver)
public void setRepositoryManager(RepositoryManager repositoryManager)
public void setEncryptionService(EncryptionService encryptionService)
public CapabilityContext getCapabilityContext()
public void setCapabilityContext(CapabilityContext capabilityContext)
public java.lang.String getRealRepositoryUrl()
public boolean isVerboseLogs()
public java.lang.String getOptionDescription()
@Nullable public java.lang.String getEncryptedPassword()
public CacheId getCacheId(@NotNull CachingAwareRepository.CachableOperation cachableOperation)
CachingAwareRepository
getCacheId
in interface CachingAwareRepository
public boolean isCachingSupportedFor(@NotNull CachingAwareRepository.CachableOperation cachableOperation)
isCachingSupportedFor
in interface CachingAwareRepository
@NotNull public java.util.List<VcsBranch> getOpenBranches(@Nullable java.lang.String context) throws RepositoryException
BranchDetectionCapableRepository
Set
of 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).
getOpenBranches
in interface BranchDetectionCapableRepository
List
of branch names. May be empty.
RepositoryException
@Nullable public java.lang.String getUsername()
@NotNull public VcsBranch getVcsBranch()
getVcsBranch
in interface BranchAwareRepository
public void setVcsBranch(@NotNull VcsBranch branch)
BranchAwareRepository
setVcsBranch
in interface BranchAwareRepository
public CommitContext getFirstCommit() throws RepositoryException
BranchDetectionCapableRepository
getFirstCommit
in interface BranchDetectionCapableRepository
RepositoryException
public CommitContext getLastCommit() throws RepositoryException
BranchDetectionCapableRepository
getLastCommit
in interface BranchDetectionCapableRepository
RepositoryException
public boolean mergeWorkspaceWith(@NotNull BuildContext buildContext, @NotNull java.io.File checkoutDirectory, @NotNull java.lang.String targetRevision) throws RepositoryException
BranchMergingAwareRepository
mergeWorkspaceWith
in interface BranchMergingAwareRepository
buildContext
- the build context of build doing the mergecheckoutDirectory
- the workspace to use for mergetargetRevision
- the revision to merge with
RepositoryException
public boolean isMergingSupported()
isMergingSupported
in interface BranchMergingAwareRepository
public void pushRevision(@NotNull java.io.File sourceDirectory, @Nullable java.lang.String vcsRevisionKey) throws RepositoryException
PushCapableRepository
pushRevision
in interface PushCapableRepository
sourceDirectory
- - the working directory of the repository we want to push fromvcsRevisionKey
- - the revisionKey (usually a branch name) to push
RepositoryException
- - when something goes wrong@NotNull public java.lang.String commit(@NotNull java.io.File sourceDirectory, @NotNull java.lang.String message) throws RepositoryException
PushCapableRepository
commit
in interface PushCapableRepository
sourceDirectory
- - which workspace directory to perform the commitmessage
- - what message use for commit
RepositoryException
- - when something goes wrong
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |