public class S3ArtifactHandler extends AbstractRepublishingArtifactHandler implements RepublishingArtifactHandler
Modifier and Type | Field and Description |
---|---|
static int |
AWS_BULK_DELETE_LIMIT |
fallbackArtifactHandler
ALL_AGENT_TYPES, LOCAL_AGENTS, NON_LOCAL_AGENTS
LAN_SPEED, LOCAL_SPEED, NEVER_ARCHIVE, WAN_SPEED
Constructor and Description |
---|
S3ArtifactHandler() |
Modifier and Type | Method and Description |
---|---|
boolean |
canHandleArtifact(ArtifactDefinitionContext artifact,
Map<String,String> artifactHandlersConfiguration) |
@Nullable ArtifactLinkDataProvider |
getArtifactLinkDataProvider(Artifact artifact,
@NotNull ArtifactHandlerConfigProvider artifactHandlerConfigProvider) |
ArtifactLinkDataProvider |
getArtifactLinkDataProvider(ArtifactLink artifactLink,
@NotNull ArtifactHandlerConfigProvider artifactHandlerConfigProvider) |
long |
getMaxUnarchivedFilesPerArtifact(@NotNull Map<String,String> artifactHandlersConfiguration)
Returns the maximum number of files that can exist per artifact which will not be compressed and combined into
a single archive.
|
int |
getSpeed(@NotNull Map<String,String> artifactHandlersConfiguration)
Return approximate transfer speed of this artifact handler in bytes per second for the specified configuration.
|
boolean |
isRepublishingSupported()
If republishing is really supported.
|
boolean |
moveArtifactToGlobalStorage(@NotNull Artifact artifact,
@NotNull ArtifactHandlerConfigProvider artifactHandlerConfigProvider)
Move artifact to a 'global storage'.
|
@NotNull ArtifactHandlerPublishingResult |
publish(@NotNull ResultKey resultKey,
@NotNull ArtifactDefinitionContext artifact,
@NotNull ArtifactPublishingConfig artifactPublishingConfig,
@Nullable BuildLogger buildLogger) |
void |
removeArtifactFromStorage(@NotNull Artifact artifact,
@NotNull ArtifactHandlerConfigProvider artifactHandlerConfigProvider)
Removes artifact files for a single artifact.
|
void |
removeArtifactFromStorage(@NotNull PlanResultKey planResultKey,
@NotNull ImmutableArtifactDefinitionBase artifact,
@NotNull ArtifactHandlerConfigProvider artifactHandlerConfigProvider)
Removes artifact files for a single artifact.
|
void |
removeArtifactFromStorage(@NotNull ResultKey planResultKey,
@NotNull ImmutableArtifactDefinitionBase artifact,
@NotNull ArtifactHandlerConfigProvider artifactHandlerConfigProvider)
Removes artifact files for a single artifact.
|
void |
removeArtifactsFromStorage(@NotNull PlanKey planKey,
@NotNull ArtifactHandlerConfigProvider artifactHandlerConfigProvider)
Removes artifact files for all results of a single.
|
void |
removeArtifactsFromStorage(@NotNull PlanResultKey planResultKey,
@NotNull ArtifactHandlerConfigProvider artifactHandlerConfigProvider)
Removes artifact files for a single plan result.
|
@NotNull ArtifactHandlerPublishingResult |
republish(@NotNull ArtifactHandlerPublishingResult previousPublishingResult,
@NotNull ResultKey resultKey,
@NotNull ArtifactDefinitionContext artifact,
@NotNull ArtifactHandlerConfigProvider artifactHandlerConfigProvider,
@Nullable BuildLogger buildLogger)
Method called when remote agent tries to recover from result publishing failures.
|
@NotNull ArtifactRetrievalStatus |
retrieve(@NotNull ResultKey clientKey,
@NotNull Artifact artifact,
@NotNull ArtifactSubscriptionContext artifactSubscription,
@NotNull ArtifactRetrievalConfig artifactRetrievalConfig)
Retrieve arbitrary
Artifact . |
getFileSetFromFallbackStorage, makeNotNull
configProvider, configProvider, getConfigurationKey, getConfigValue, getDefaultConfiguration, getModuleDescriptor, getSupportedAgents, init
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
republish
getDefaultConfiguration, getModuleDescriptor, getSupportedAgents, publish
public static final int AWS_BULK_DELETE_LIMIT
@NotNull public @NotNull ArtifactHandlerPublishingResult publish(@NotNull @NotNull ResultKey resultKey, @NotNull @NotNull ArtifactDefinitionContext artifact, @NotNull @NotNull ArtifactPublishingConfig artifactPublishingConfig, @Nullable @Nullable BuildLogger buildLogger) throws Exception
publish
in interface ArtifactHandler
Exception
@NotNull public @NotNull ArtifactHandlerPublishingResult republish(@NotNull @NotNull ArtifactHandlerPublishingResult previousPublishingResult, @NotNull @NotNull ResultKey resultKey, @NotNull @NotNull ArtifactDefinitionContext artifact, @NotNull @NotNull ArtifactHandlerConfigProvider artifactHandlerConfigProvider, @Nullable @Nullable BuildLogger buildLogger) throws Exception
RepublishingArtifactHandler
ArtifactHandlerPublishingResult.Status.DEFERRED
.republish
in interface RepublishingArtifactHandler
Exception
public boolean isRepublishingSupported()
RepublishingArtifactHandler
isRepublishingSupported
in interface RepublishingArtifactHandler
public boolean canHandleArtifact(ArtifactDefinitionContext artifact, Map<String,String> artifactHandlersConfiguration)
canHandleArtifact
in interface ArtifactHandler
canHandleArtifact
in class AbstractArtifactHandler
public boolean moveArtifactToGlobalStorage(@NotNull @NotNull Artifact artifact, @NotNull @NotNull ArtifactHandlerConfigProvider artifactHandlerConfigProvider) throws IOException
ArtifactHandler
ArtifactHandler.removeArtifactFromStorage(Artifact, ArtifactHandlerConfigProvider)
is called.
It is not a requirement to physically move the files as long as the above contract is fulfilled.moveArtifactToGlobalStorage
in interface ArtifactHandler
IOException
@NotNull public @NotNull ArtifactRetrievalStatus retrieve(@NotNull @NotNull ResultKey clientKey, @NotNull @NotNull Artifact artifact, @NotNull @NotNull ArtifactSubscriptionContext artifactSubscription, @NotNull @NotNull ArtifactRetrievalConfig artifactRetrievalConfig) throws IOException
ArtifactHandler
Artifact
. Artifact is found by the information in artifact parameter.retrieve
in interface ArtifactHandler
clientKey
- identifier of plan or deployment doing the downloadartifact
- artifact informationartifactSubscription
- download details (e.g. target path, copy pattern)artifactRetrievalConfig
- handler specific configurationIOException
public int getSpeed(@NotNull @NotNull Map<String,String> artifactHandlersConfiguration)
ArtifactHandler
getSpeed
in interface ArtifactHandler
artifactHandlersConfiguration
- artifact handler configurationArtifactHandler.LOCAL_SPEED
, ArtifactHandler.LAN_SPEED
, ArtifactHandler.WAN_SPEED
public void removeArtifactFromStorage(@NotNull @NotNull Artifact artifact, @NotNull @NotNull ArtifactHandlerConfigProvider artifactHandlerConfigProvider)
ArtifactHandler
removeArtifactFromStorage
in interface ArtifactHandler
public void removeArtifactFromStorage(@NotNull @NotNull PlanResultKey planResultKey, @NotNull @NotNull ImmutableArtifactDefinitionBase artifact, @NotNull @NotNull ArtifactHandlerConfigProvider artifactHandlerConfigProvider)
ArtifactHandler
ArtifactLink
Should not remove artifacts that were moved to global storage.removeArtifactFromStorage
in interface ArtifactHandler
public void removeArtifactFromStorage(@NotNull @NotNull ResultKey planResultKey, @NotNull @NotNull ImmutableArtifactDefinitionBase artifact, @NotNull @NotNull ArtifactHandlerConfigProvider artifactHandlerConfigProvider)
ArtifactHandler
ArtifactLink
Should not remove artifacts that were moved to global storage.removeArtifactFromStorage
in interface ArtifactHandler
public void removeArtifactsFromStorage(@NotNull @NotNull PlanResultKey planResultKey, @NotNull @NotNull ArtifactHandlerConfigProvider artifactHandlerConfigProvider)
ArtifactHandler
ResultsSummary
Should not remove artifacts that were moved to global storage.removeArtifactsFromStorage
in interface ArtifactHandler
public void removeArtifactsFromStorage(@NotNull @NotNull PlanKey planKey, @NotNull @NotNull ArtifactHandlerConfigProvider artifactHandlerConfigProvider)
ArtifactHandler
Plan
Should not remove artifacts that were moved to global storage.removeArtifactsFromStorage
in interface ArtifactHandler
public ArtifactLinkDataProvider getArtifactLinkDataProvider(ArtifactLink artifactLink, @NotNull @NotNull ArtifactHandlerConfigProvider artifactHandlerConfigProvider)
getArtifactLinkDataProvider
in interface ArtifactHandler
@Nullable public @Nullable ArtifactLinkDataProvider getArtifactLinkDataProvider(Artifact artifact, @NotNull @NotNull ArtifactHandlerConfigProvider artifactHandlerConfigProvider)
getArtifactLinkDataProvider
in interface ArtifactHandler
public long getMaxUnarchivedFilesPerArtifact(@NotNull @NotNull Map<String,String> artifactHandlersConfiguration)
ArtifactHandler
Returns the maximum number of files that can exist per artifact which will not be compressed and combined into a single archive. If the threshold is exceeded, artifacts will be packaged into a single file before publishing.
ArtifactHandler
does not need to treat archived artifacts differently - from ArtifactHandler
perspective the packaging is transparent. Artifact files will be compressed before invoking #publish method and
decompressed after invoking #retrieve method.
This method should return ArtifactHandler.NEVER_ARCHIVE
if packaging of artifacts is disabled, to always send files
unarchived.
getMaxUnarchivedFilesPerArtifact
in interface ArtifactHandler
getMaxUnarchivedFilesPerArtifact
in class AbstractArtifactHandler
artifactHandlersConfiguration
- artifact handler configurationCopyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.