Class DefaultConsoleUrlProvider

java.lang.Object
jenkins.console.DefaultConsoleUrlProvider
All Implemented Interfaces:
Describable<ConsoleUrlProvider>, ConsoleUrlProvider

@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public class DefaultConsoleUrlProvider extends Object implements ConsoleUrlProvider
Default implementation of ConsoleUrlProvider that uses the standard Jenkins console view.

Exists so that users have a way to override ConsoleUrlProviderGlobalConfiguration and specify the default console view if desired via ConsoleUrlProviderUserProperty.

Since:
2.433
  • Constructor Details

    • DefaultConsoleUrlProvider

      @DataBoundConstructor public DefaultConsoleUrlProvider()
  • Method Details

    • getConsoleUrl

      public String getConsoleUrl(Run<?,?> run)
      Description copied from interface: ConsoleUrlProvider
      Get a URL relative to the context path of Jenkins which should be used to link to the console for the specified build.

      Should only be used in the context of serving an HTTP request.

      Specified by:
      getConsoleUrl in interface ConsoleUrlProvider
      Parameters:
      run - the build
      Returns:
      the URL for the console for the specified build, relative to the context of Jenkins (should not start with /), or null if this implementation does not want to serve a special console view for this build.