Class ArtifactProcessor
- java.lang.Object
-
- jetbrains.buildServer.agent.impl.artifacts.ArtifactProcessor
-
- All Implemented Interfaces:
ArtifactsWatcher
,ArtifactsWatcherEx
public class ArtifactProcessor extends Object implements ArtifactsWatcherEx
-
-
Field Summary
Fields Modifier and Type Field Description static String
DISABLE_FILECACHE_PUBLISHING
static String
SYMBOLIC_LINKS_TYPE_PARAMETER
-
Constructor Summary
Constructors Constructor Description ArtifactProcessor(ExtensionHolder extensionsLocator, EventDispatcher<AgentLifeCycleListener> agentDispatcher, ArtifactsPublisherProvider publishersProvider, BuildCacheHolder buildCacheHolder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<ArtifactsCollection>
addBuildCachePath(String cacheName, String path)
Adds givenpath
to the cache with namecacheName
void
addInternalArtifactsPath(String artifactsPath)
void
addNewArtifactsPath(String artifactsPath)
Notifies agent about new path where build artifacts residevoid
init(BuildProgressLogger logger, AgentLogProxy logProxy)
void
interruptPublishing()
static boolean
isPublishingStopped(AgentRunningBuild build)
void
setArtifactsPublishingPreconditions(Collection<ArtifactsPublishingPrecondition> artifactsPublishingPreconditions)
void
setBuilderListeners(Collection<ArtifactsBuilderListener> builderListeners)
void
setPreprocessors(Collection<ArtifactsPreprocessor> artifactsPreprocessors)
void
waitForPublishingFinish()
Wait for publishing is finish.
-
-
-
Field Detail
-
DISABLE_FILECACHE_PUBLISHING
public static final String DISABLE_FILECACHE_PUBLISHING
- See Also:
- Constant Field Values
-
SYMBOLIC_LINKS_TYPE_PARAMETER
public static final String SYMBOLIC_LINKS_TYPE_PARAMETER
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ArtifactProcessor
public ArtifactProcessor(@NotNull ExtensionHolder extensionsLocator, @NotNull EventDispatcher<AgentLifeCycleListener> agentDispatcher, @NotNull ArtifactsPublisherProvider publishersProvider, @NotNull BuildCacheHolder buildCacheHolder)
-
-
Method Detail
-
init
public void init(@NotNull BuildProgressLogger logger, @NotNull AgentLogProxy logProxy)
-
setPreprocessors
public void setPreprocessors(@NotNull Collection<ArtifactsPreprocessor> artifactsPreprocessors)
-
setBuilderListeners
public void setBuilderListeners(@NotNull Collection<ArtifactsBuilderListener> builderListeners)
-
setArtifactsPublishingPreconditions
public void setArtifactsPublishingPreconditions(@NotNull Collection<ArtifactsPublishingPrecondition> artifactsPublishingPreconditions)
-
addInternalArtifactsPath
public void addInternalArtifactsPath(@NotNull String artifactsPath)
- Specified by:
addInternalArtifactsPath
in interfaceArtifactsWatcherEx
-
addBuildCachePath
public List<ArtifactsCollection> addBuildCachePath(@NotNull String cacheName, @NotNull String path)
Description copied from interface:ArtifactsWatcherEx
Adds givenpath
to the cache with namecacheName
- Specified by:
addBuildCachePath
in interfaceArtifactsWatcherEx
- Parameters:
cacheName
- cache namepath
- path to add- Returns:
- a collection of artifacts that was supposed to be published (but might not have been published)
-
addNewArtifactsPath
public void addNewArtifactsPath(@NotNull String artifactsPath)
Description copied from interface:ArtifactsWatcher
Notifies agent about new path where build artifacts reside- Specified by:
addNewArtifactsPath
in interfaceArtifactsWatcher
- Parameters:
artifactsPath
- artifacts path in TeamCity format
-
waitForPublishingFinish
public void waitForPublishingFinish()
Description copied from interface:ArtifactsWatcher
Wait for publishing is finish. SinceArtifactsWatcher.addNewArtifactsPath(String)
only schedules artifacts publishing if client code should wait for publication finishing it should invoke this method. The method will block until publication is finished, failed or cancelled (for example in case of build interruption)- Specified by:
waitForPublishingFinish
in interfaceArtifactsWatcher
-
interruptPublishing
public void interruptPublishing()
- Specified by:
interruptPublishing
in interfaceArtifactsWatcherEx
-
isPublishingStopped
public static boolean isPublishingStopped(@NotNull AgentRunningBuild build)
-
-