public class SvnBambooSpecsHandler extends AbstractSvnExecutor implements BambooSpecsHandler
customVariableContext, svnClientManagerFactory
BAMBOO_SPECS_DIRECTORY, BAMBOO_YAML_FILES
Constructor and Description |
---|
SvnBambooSpecsHandler() |
Modifier and Type | Method and Description |
---|---|
@NotNull Optional<String> |
detectSpecRevision(@NotNull VcsRepositoryData repositoryData,
@NotNull Object source)
Attempts to obtain latest revision from the repository which may have changed Bamboo Specs.
|
@NotNull List<CommitContext> |
findCommitsToSpecs(@NotNull VcsRepositoryData repositoryData,
@NotNull String rev1,
@NotNull String rev2)
Extracts a list of commits related to Bamboo Specs, which occurred between revisions
rev1 and
rev2 . |
boolean |
isNewer(@NotNull VcsRepositoryData repositoryData,
@NotNull String rev1,
@NotNull String rev2)
Returns true if
rev2 is a newer revision in the repository than rev1 and therefore the specs should be run. |
boolean |
isWebhookRequired() |
checkPathExists, copyRepository, doInfo, extractTrustedKey, getBranchDetectionRootUrl, getBranchRootUrl, getCommits, getSubstitutedAccessData, getSubstitutedAccessDataBuilder, getSvnClientManager, getTagRootUrl, getWorkingCopyFormatFromConfiguration, substituteString, svnUrltoVcsBranch
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
divergentBranchesEnabled, supportsDivergentBranches
@NotNull public @NotNull Optional<String> detectSpecRevision(@NotNull @NotNull VcsRepositoryData repositoryData, @NotNull @NotNull Object source) throws RepositoryException
BambooSpecsHandler
detectSpecRevision
in interface BambooSpecsHandler
repositoryData
- repositorysource
- entry point to begin scanning (for example: branch name), actual type may depend on
repository typeBambooSpecsHandler.BAMBOO_SPECS_DIRECTORY
doesn't exist.RepositoryException
public boolean isNewer(@NotNull @NotNull VcsRepositoryData repositoryData, @NotNull @NotNull String rev1, @NotNull @NotNull String rev2)
BambooSpecsHandler
rev2
is a newer revision in the repository than rev1
and therefore the specs should be run. In typical cases, returns
true if it is possible to reach rev1
by following parent relationship starting from rev2
.
Exceptional cases involve suspected force push or 'clear' merges that don't result in changes in specs being connected to the merge commit. In those cases
it assumed that rev2 is newer even though no ancestry path exists between rev1 and rev2.isNewer
in interface BambooSpecsHandler
@NotNull public @NotNull List<CommitContext> findCommitsToSpecs(@NotNull @NotNull VcsRepositoryData repositoryData, @NotNull @NotNull String rev1, @NotNull @NotNull String rev2) throws RepositoryException
BambooSpecsHandler
rev1
and
rev2
.findCommitsToSpecs
in interface BambooSpecsHandler
RepositoryException
public boolean isWebhookRequired()
isWebhookRequired
in interface BambooSpecsHandler
Copyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.