Class BatchArchivePreprocessor
- java.lang.Object
-
- jetbrains.buildServer.agent.impl.artifacts.ArchivePreprocessor
-
- jetbrains.buildServer.agent.impl.artifacts.BatchArchivePreprocessor
-
- All Implemented Interfaces:
AgentExtension
,ArtifactsPreprocessor
,TeamCityExtension
- Direct Known Subclasses:
TarPreprocessor
,ZipPreprocessor
public abstract class BatchArchivePreprocessor extends ArchivePreprocessor
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jetbrains.buildServer.agent.ArtifactsPreprocessor
ArtifactsPreprocessor.SymbolicLinksMode
-
-
Field Summary
Fields Modifier and Type Field Description static int
FILES_CACHE_SIZE
-
Fields inherited from class jetbrains.buildServer.agent.impl.artifacts.ArchivePreprocessor
FILES_TO_LOG_COUNT, myTempArchiveFile
-
Fields inherited from interface jetbrains.buildServer.agent.ArtifactsPreprocessor
TARGET_PATH_SEPARATOR
-
-
Constructor Summary
Constructors Constructor Description BatchArchivePreprocessor(BuildProgressLogger logger, File tempDir)
BatchArchivePreprocessor(EventDispatcher<AgentLifeCycleListener> dispatcher)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
closeArchive()
protected boolean
collectUnixFileInfoEnabled()
protected ArtifactsPreprocessor.SymbolicLinksMode
getSymbolicLinksMode()
void
processArtifacts(String targetPathOnServer, Map<File,String> filePathMap, ArtifactsPreprocessor.SymbolicLinksMode mode)
Publishes files.protected abstract void
processFile(File fileToAdd, String entryName, UnixFileInfoUtil.FileInfo unixFileInfo)
protected void
putFileToArchive(File fileToAdd, String entryName)
-
Methods inherited from class jetbrains.buildServer.agent.impl.artifacts.ArchivePreprocessor
createFileOutputStream, createPathMatcher, getTargetKey, isFileAccessible, openArchive, setLogger, shouldProcess
-
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.ArtifactsPreprocessor
processArtifacts
-
-
-
-
Field Detail
-
FILES_CACHE_SIZE
public static final int FILES_CACHE_SIZE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BatchArchivePreprocessor
public BatchArchivePreprocessor(@NotNull EventDispatcher<AgentLifeCycleListener> dispatcher)
-
BatchArchivePreprocessor
public BatchArchivePreprocessor(BuildProgressLogger logger, File tempDir)
-
-
Method Detail
-
processArtifacts
public void processArtifacts(String targetPathOnServer, @NotNull Map<File,String> filePathMap, @NotNull ArtifactsPreprocessor.SymbolicLinksMode mode) throws ArtifactPreprocessingFailedException
Description copied from interface:ArtifactsPreprocessor
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. Usage example 1: gzip published file: file.txt => some/path.gz will gzip file.txt and convert map to path.gz => some/path.gz- Specified by:
processArtifacts
in interfaceArtifactsPreprocessor
- Overrides:
processArtifacts
in classArchivePreprocessor
- Parameters:
targetPathOnServer
- target path on server, right part of "file.dmg => dist/" expressionfilePathMap
- map of the file to publish to its destination directory. This map can be altered by the implementation. For archives, target path may contain several entries separated byArtifactsPreprocessor.TARGET_PATH_SEPARATOR
, like file.txt => "a.zip!/foo/\na.zip!/bar/"mode
- simbolic links mode- Throws:
ArtifactPreprocessingFailedException
-
closeArchive
protected void closeArchive() throws IOException
- Specified by:
closeArchive
in classArchivePreprocessor
- Throws:
IOException
-
putFileToArchive
protected void putFileToArchive(File fileToAdd, String entryName) throws IOException
- Specified by:
putFileToArchive
in classArchivePreprocessor
- Throws:
IOException
-
getSymbolicLinksMode
@NotNull protected ArtifactsPreprocessor.SymbolicLinksMode getSymbolicLinksMode()
-
collectUnixFileInfoEnabled
protected boolean collectUnixFileInfoEnabled()
-
processFile
protected abstract void processFile(File fileToAdd, String entryName, @Nullable UnixFileInfoUtil.FileInfo unixFileInfo) throws IOException
- Throws:
IOException
-
-