Class WebPublisher
- java.lang.Object
-
- jetbrains.buildServer.agent.impl.BaseArtifactsPublisher
-
- jetbrains.buildServer.agent.publisher.WebPublisher
-
- All Implemented Interfaces:
AgentExtension,ArtifactsPublisher,DigestProducingArtifactsPublisher,TeamCityExtension
public class WebPublisher extends BaseArtifactsPublisher implements DigestProducingArtifactsPublisher
- Author:
- Kir
-
-
Field Summary
Fields Modifier and Type Field Description static StringARTEFACT_UPLOAD_URL
-
Constructor Summary
Constructors Constructor Description WebPublisher(EventDispatcher<AgentLifeCycleListener> dispatcher, ArtifactUploadUrlProvider uploadUrlProvider)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetType()Get type string id.intpublishFiles(Map<File,String> filePathMap)Publishes files.intpublishFilesWithDigests(Map<File,String> filePathMap, FlowLogger logger, Consumer<ArtifactDigestInfo> digestConsumer)Publishes files.static List<List<ArtifactFileInfo>>split(List<ArtifactFileInfo> files, long maxPartSize)-
Methods inherited from class jetbrains.buildServer.agent.impl.BaseArtifactsPublisher
isEnabled
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jetbrains.buildServer.agent.ArtifactsPublisher
isEnabled
-
-
-
-
Field Detail
-
ARTEFACT_UPLOAD_URL
public static final String ARTEFACT_UPLOAD_URL
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
WebPublisher
public WebPublisher(@NotNull EventDispatcher<AgentLifeCycleListener> dispatcher, @NotNull ArtifactUploadUrlProvider uploadUrlProvider)
-
-
Method Detail
-
publishFiles
public int publishFiles(@NotNull Map<File,String> filePathMap) throws ArtifactPublishingFailedExceptionDescription copied from interface:ArtifactsPublisherPublishes files. Note that publishing is performed from the agent messages queue and thus this method can be called when build on the agent is already finished.- Specified by:
publishFilesin interfaceArtifactsPublisher- Parameters:
filePathMap- map of the file to publish to its destination directory- Returns:
- number of successfully published files
- Throws:
ArtifactPublishingFailedException- if publishing failed
-
publishFilesWithDigests
public int publishFilesWithDigests(@NotNull Map<File,String> filePathMap, @NotNull FlowLogger logger, @Nullable Consumer<ArtifactDigestInfo> digestConsumer)Description copied from interface:DigestProducingArtifactsPublisherPublishes files. Note that publishing is performed from the agent messages queue and thus this method can be called when build on the agent is already finished.- Specified by:
publishFilesWithDigestsin interfaceDigestProducingArtifactsPublisher- Parameters:
filePathMap- map of the file to publish to its destination directorydigestConsumer- optional consumer for artifact digests- Returns:
- Number of published artifacts
-
getType
@NotNull public String getType()
Description copied from interface:ArtifactsPublisherGet type string id. Should matchjetbrains.buildServer.serverSide.storage.StorageType#getType()- Specified by:
getTypein interfaceArtifactsPublisher- Returns:
- see above
-
split
public static List<List<ArtifactFileInfo>> split(@NotNull List<ArtifactFileInfo> files, long maxPartSize)
-
-