public class BitbucketServerBuildWarningsUpdater extends AbstractBitbucketServerExecutor implements VcsBuildWarningsUpdater
vcsRepositoryManager
Constructor and Description |
---|
BitbucketServerBuildWarningsUpdater() |
Modifier and Type | Method and Description |
---|---|
void |
deleteBuildWarnings(VcsRepositoryData repository,
String changeSetId,
ImmutableChainResultsSummary resultsSummary)
Removes all warnings previously sent by Bamboo for the given repository used in a build.
|
ContextualVcsId<VcsBuildWarningsUpdater> |
getVcsIdForExecutor(VcsRepositoryData repository)
Returned id has to fulfill the following:
Given two VcsRepositoryData objects A and B, and executor e returning equal ContextualVcsId (in terms of equals()),
for any operation foo() provided by the executor,
the calls e::foo(A) and e::foo(B) should be equivalent.
|
boolean |
sendBuildWarnings(VcsRepositoryData repository,
String changesetId,
ImmutableChainResultsSummary resultsSummary,
BuildWarningSummary warningSummary,
Iterable<WarningAnnotation> warnings)
Sends build warnings for the given repository used in a build.
|
boolean |
supportsBuildWarnings(VcsRepositoryData repository)
Returns true if build warnings are supported by the given
repository . |
bitbucketServerToGitData, bitbucketServerToReadOnlyGitData, getGitModuleDescriptor, stashServerRemoteEventsAreWorking
@Nullable public ContextualVcsId<VcsBuildWarningsUpdater> getVcsIdForExecutor(@NotNull VcsRepositoryData repository)
IdentifyingExecutor
VcsBranchDetector
. If they also point
to the same branch, they are considered equal in context of VcsChangeDetector
getVcsIdForExecutor
in interface IdentifyingExecutor<VcsBuildWarningsUpdater>
public boolean supportsBuildWarnings(@NotNull VcsRepositoryData repository)
VcsBuildWarningsUpdater
repository
.supportsBuildWarnings
in interface VcsBuildWarningsUpdater
public boolean sendBuildWarnings(@NotNull VcsRepositoryData repository, @NotNull String changesetId, @NotNull ImmutableChainResultsSummary resultsSummary, @NotNull BuildWarningSummary warningSummary, @NotNull Iterable<WarningAnnotation> warnings) throws RepositoryException
VcsBuildWarningsUpdater
This method can be called multiple times to send warnings incrementally, to allow external data batching.
sendBuildWarnings
in interface VcsBuildWarningsUpdater
repository
- repository for which to send code warningschangesetId
- commit identifierresultsSummary
- summary of the build result which generated the warningswarningSummary
- summary of the warningswarnings
- batch of warnings to sendtrue
if annotations have been successfully sent, false
otherwise. When false
is
returned, no further calls to this method should be performed for the same repository and result.RepositoryException
- if for any reason the build warnings could not have been sent.public void deleteBuildWarnings(@NotNull VcsRepositoryData repository, @NotNull String changeSetId, @NotNull ImmutableChainResultsSummary resultsSummary) throws RepositoryException
VcsBuildWarningsUpdater
deleteBuildWarnings
in interface VcsBuildWarningsUpdater
repository
- repository for which to delete code warningschangeSetId
- commit identifierresultsSummary
- summary of the build result which generated the warningsRepositoryException
- if for any reason the build warnings could not have been deleted.Copyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.