Interface AgentArtifactHelper


  • public interface AgentArtifactHelper
    Helper interface for agent artifact publishers and accessors. Implementation will be autowired by Spring context.
    Since:
    2017.1
    Author:
    vbedrosova
    • Method Detail

      • publishArtifactList

        void publishArtifactList​(@NotNull
                                 java.util.List<ArtifactDataInstance> artifacts,
                                 @Nullable
                                 java.util.Map<java.lang.String,​java.lang.String> commonProperties)
                          throws java.io.IOException
        Publish information about current build external artifacts. Use this method to provide information about artifacts uploaded to external storage during the build.
        Method will create and publish a file with json-serialized data. Note, that appending to already uploaded file is not supported. Subsequent calls will result in file being overwritten.
        Parameters:
        artifacts - list with information about external artifacts
        commonProperties - common properties map for these list
        Throws:
        java.io.IOException - in case of errors
      • isEnabled

        boolean isEnabled​(@NotNull
                          ArtifactsPublisher publisher,
                          @NotNull
                          java.lang.String path)
        Whether or not the artifact should be published by the publisher
        Parameters:
        publisher - publisher
        path - resulting artifact path
        Returns:
        true if publisher should publish artifact
        Since:
        2020.2