Class Main


  • public class Main
    extends Object
    Entry point to pseudo-JNLP agent.

    See also jenkins-agent.jnlp.jelly in the core.

    Author:
    Kohsuke Kawaguchi
    • Field Detail

      • tunnel

        public String tunnel
      • headlessMode

        @Deprecated
        public boolean headlessMode
        Deprecated.
      • webSocket

        public boolean webSocket
      • credentials

        public String credentials
      • proxyCredentials

        public String proxyCredentials
      • noReconnect

        public boolean noReconnect
      • noKeepAlive

        public boolean noKeepAlive
      • candidateCertificates

        public List<String> candidateCertificates
      • disableHttpsCertValidation

        public boolean disableHttpsCertValidation
        Disables HTTPs Certificate validation of the server when using JnlpAgentEndpointResolver. This option is not recommended for production use.
      • agentLog

        @CheckForNull
        public File agentLog
        Specifies a destination for error logs. If specified, this option overrides the default destination within workDir. If both this options and workDir is not set, the log will not be generated.
        Since:
        3.8
      • loggingConfigFile

        @CheckForNull
        public File loggingConfigFile
        Specified location of the property file with JUL settings.
        Since:
        3.8
      • workDir

        @CheckForNull
        public File workDir
        Specifies a default working directory of the remoting instance. If specified, this directory will be used to store logs, JAR cache, etc.

        In order to retain compatibility, the option is disabled by default.

        Jenkins specifics: This working directory is expected to be equal to the agent root specified in Jenkins configuration.

        Since:
        3.8
      • internalDir

        @NonNull
        public String internalDir
        Specifies a directory within workDir, which stores all the remoting-internal files.

        This option is not expected to be used frequently, but it allows remoting users to specify a custom storage directory if the default remoting directory is consumed by other stuff.

        Since:
        3.8
      • failIfWorkDirIsMissing

        public boolean failIfWorkDirIsMissing
        Fail the initialization if the workDir or internalDir are missing. This option presumes that the workspace structure gets initialized previously in order to ensure that we do not start up with a borked instance (e.g. if a filesystem mount gets disconnected).
        Since:
        3.8
      • jarCache

        public File jarCache
        Since:
        2.24
      • directConnection

        public String directConnection
        Connect directly to the TCP port specified, skipping the HTTP(S) connection parameter download.
        Since:
        3.34
      • instanceIdentity

        public String instanceIdentity
        The controller's instance identity.
        Since:
        3.34
        See Also:
        Instance Identity
      • protocols

        public List<String> protocols
        When instanceIdentity is set, the agent skips connecting via http(s) where it normally obtains the configured protocols. When no protocols are given the agent tries all protocols it knows. Use this to limit the protocol list.
        Since:
        3.34
      • showHelp

        public boolean showHelp
        Shows help message and then exits
        Since:
        3.36
      • showVersion

        public boolean showVersion
        Shows version information and then exits
        Since:
        3.36
      • args

        public List<String> args
        Two mandatory parameters: secret key, and agent name.
    • Constructor Detail

      • Main

        public Main()