Class InboundAgentFixture.Options.Builder<B extends InboundAgentFixture.Options.Builder,O extends InboundAgentFixture.Options>

java.lang.Object
org.jvnet.hudson.test.fixtures.InboundAgentFixture.Options.Builder<B,O>
Direct Known Subclasses:
InboundAgentExtension.Options.Builder, InboundAgentRule.Options.Builder
Enclosing class:
InboundAgentFixture.Options<O extends InboundAgentFixture.Options>

public static class InboundAgentFixture.Options.Builder<B extends InboundAgentFixture.Options.Builder,O extends InboundAgentFixture.Options> extends Object
  • Field Details

  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • name

      public B name(String name)
      Set the name of the agent.
      Parameters:
      name - the name
      Returns:
      this builder
    • color

      public B color(PrefixedOutputStream.AnsiColor color)
      Set a color for agent logs.
      Parameters:
      color - the color
      Returns:
      this builder
    • webSocket

      public B webSocket()
      Use WebSocket when connecting.
      Returns:
      this builder
    • webSocket

      public B webSocket(boolean websocket)
      Configure usage of WebSocket when connecting.
      Parameters:
      websocket - use websocket if true, otherwise use inbound TCP
      Returns:
      this builder
    • tunnel

      public B tunnel(String tunnel)
      Set a tunnel for the agent
      Returns:
      this builder
    • javaOptions

      public B javaOptions(String... opts)
    • trustStore

      public B trustStore(String path, String password)
      Provide a custom truststore for the agent JVM. Can be useful when using a setup with a reverse proxy.
      Parameters:
      path - the path to the truststore
      password - the password for the truststore
      Returns:
      this builder
    • cert

      public B cert(String cert)
      Sets a custom certificate for the agent JVM, passed as the Remoting `-cert` CLI argument. When using RealJenkinsExtension, use RealJenkinsExtension.getRootCAPem() to obtain the required value to pass to this method.
      Parameters:
      cert - the certificate to use
      Returns:
      this builder
    • noCertificateCheck

      public B noCertificateCheck()
      Disables certificate verification for the agent JVM, passed as the Remoting `-noCertificateCheck` CLI argument.
      Returns:
      this builder
    • skipStart

      public B skipStart()
      Skip starting the agent.
      Returns:
      this builder
    • label

      public B label(String label)
      Set a label for the agent.
      Returns:
      this builder.
    • withLogger

      public B withLogger(Class<?> clazz, Level level)
    • withPackageLogger

      public B withPackageLogger(Class<?> clazz, Level level)
    • withLogger

      public B withLogger(String logger, Level level)
    • build

      public O build()
      Build and return an InboundAgentFixture.Options.
      Returns:
      a new InboundAgentFixture.Options