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 String
ARTEFACT_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 String
getType()
Get type string id.int
publishFiles(Map<File,String> filePathMap)
Publishes files.int
publishFilesWithDigests(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 ArtifactPublishingFailedException
Description copied from interface:ArtifactsPublisher
Publishes 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:
publishFiles
in 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:DigestProducingArtifactsPublisher
Publishes 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:
publishFilesWithDigests
in 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:ArtifactsPublisher
Get type string id. Should matchjetbrains.buildServer.serverSide.storage.StorageType#getType()
- Specified by:
getType
in interfaceArtifactsPublisher
- Returns:
- see above
-
split
public static List<List<ArtifactFileInfo>> split(@NotNull List<ArtifactFileInfo> files, long maxPartSize)
-
-