Interface TestConnectionAwareRepository

    • Field Detail

      • HOST_KEY

        static final String HOST_KEY
        Marker field for error messages related to host key verification.
    • Method Detail

      • testConnection

        @NotNull
        @NotNull ErrorCollection testConnection​(long timeout,
                                                @NotNull
                                                @NotNull TimeUnit unit)
        Test connection to the repository within the given timeout. The method should stop executing after the given time elapses.
        Parameters:
        timeout - the maximum time to wait
        unit - the time unit of the timeout argument
        Returns:
        Errors discovered during testing connection. Empty error collection should be returned if connection was successful. The errors should be translated to error messages, rather than field errors. Field errors are used by Bamboo to handle special cases.
        Since:
        5.10
      • validateForConnectionTesting

        @NotNull
        default @NotNull ErrorCollection validateForConnectionTesting​(@NotNull
                                                                      @NotNull BuildConfiguration configuration)
        A method similar to BuildConfigurationAwarePlugin.validate(BuildConfiguration) used to validate repository configuration before connection testing. This method may be more relaxed than normal validation. Additionally, different error messages may be displayed (e.g. related to impossibility of transferring files).
        Parameters:
        configuration - repository configuration to validate
        Returns:
        validation errors
        Since:
        5.13