Interface ArtifactsPreprocessor

    • Method Detail

      • getTargetKey

        @Nullable
        String getTargetKey​(String targetPath)
        If this preprocessor can process given target path, return targetPath on server, which should be later be passed to #processArtifacts method. For instance, for input a.zip/sub/path this method should return a.zip If this processor cannot process targetPath, should return null
      • processArtifacts

        void processArtifacts​(String targetPathOnServer,
                              @NotNull
                              Map<File,​String> filePathMap,
                              @NotNull
                              ArtifactsPreprocessor.SymbolicLinksMode mode)
                       throws ArtifactPreprocessingFailedException
        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
        Parameters:
        targetPathOnServer - target path on server, right part of "file.dmg => dist/" expression
        filePathMap - 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 by TARGET_PATH_SEPARATOR, like file.txt => "a.zip!/foo/\na.zip!/bar/"
        mode - simbolic links mode
        Throws:
        ArtifactPublishingFailedException - if preprocessing failed
        ArtifactPreprocessingFailedException
      • setLogger

        void setLogger​(@NotNull
                       BuildProgressLogger logger)
        Sets flow aware logger that allows to log messages in the same flow as corresponding jetbrains.buildServer.agent.ArtifactsPublisher
        Parameters:
        logger -