Package org.jvnet.hudson.test
Class InboundAgentRule.Options.Builder
java.lang.Object
org.jvnet.hudson.test.InboundAgentRule.Options.Builder
- Enclosing class:
- InboundAgentRule.Options
A builder of
InboundAgentRule.Options.
Instances of InboundAgentRule.Options.Builder are created by calling InboundAgentRule.Options.newBuilder().
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Build and return anInboundAgentRule.Options.Sets a custom certificate for the agent JVM, passed as the Remoting `-cert` CLI argument.Set a color for agent logs.javaOptions(String... opts) Set a label for the agent.Set the name of the agent.Disables certificate verification for the agent JVM, passed as the Remoting `-noCertificateCheck` CLI argument.secret()Deprecated.secret is used by default when using newer versions of RemotingSkip starting the agent.trustStore(String path, String password) Provide a custom truststore for the agent JVM.Set a tunnel for the agentUse WebSocket when connecting.webSocket(boolean websocket) Configure usage of WebSocket when connecting.withLogger(Class<?> clazz, Level level) withLogger(String logger, Level level) withPackageLogger(Class<?> clazz, Level level)
-
Method Details
-
name
Set the name of the agent.- Parameters:
name- the name- Returns:
- this builder
-
color
Set a color for agent logs.- Parameters:
color- the color- Returns:
- this builder
-
secret
Deprecated.secret is used by default when using newer versions of RemotingUse secret when connecting.- Returns:
- this builder
-
webSocket
Use WebSocket when connecting.- Returns:
- this builder
-
webSocket
Configure usage of WebSocket when connecting.- Parameters:
websocket- use websocket if true, otherwise use inbound TCP- Returns:
- this builder
-
tunnel
Set a tunnel for the agent- Returns:
- this builder
-
javaOptions
-
trustStore
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 truststorepassword- the password for the truststore- Returns:
- this builder
-
cert
Sets a custom certificate for the agent JVM, passed as the Remoting `-cert` CLI argument. When usingRealJenkinsRule, useRealJenkinsRule.getRootCAPem()to obtain the required value to pass to this method.- Parameters:
cert- the certificate to use- Returns:
- this builder
-
noCertificateCheck
Disables certificate verification for the agent JVM, passed as the Remoting `-noCertificateCheck` CLI argument.- Returns:
- this builder
-
skipStart
Skip starting the agent.- Returns:
- this builder
-
label
Set a label for the agent.- Returns:
- this builder.
-
withLogger
-
withPackageLogger
-
withLogger
-
build
Build and return anInboundAgentRule.Options.- Returns:
- a new
InboundAgentRule.Options
-