Class JenkinsClient

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public final class JenkinsClient
    extends java.lang.Object
    implements java.io.Closeable
    • Constructor Detail

      • JenkinsClient

        public JenkinsClient()
        Create a JenkinsClient inferring endpoint and authentication from environment and system properties.
      • JenkinsClient

        public JenkinsClient​(@Nullable
                             java.lang.String endPoint,
                             @Nullable
                             JenkinsAuthentication authentication,
                             @Nullable
                             java.util.Properties overrides,
                             @Nullable
                             java.util.List<com.google.inject.Module> modules)
        Create an JenkinsClient. If any of the passed in variables are null we will query System Properties and Environment Variables, in order, to search for values that may be set in a devops/CI fashion. The only difference is the `overrides` which gets merged, but takes precedence, with those System Properties and Environment Variables found.
        Parameters:
        endPoint - URL of Jenkins instance.
        authentication - authentication used to connect to Jenkins instance.
        overrides - jclouds Properties to override defaults when creating a new JenkinsApi.
        modules - a list of modules to be passed to the Contextbuilder, e.g. for logging.
    • Method Detail

      • endPoint

        public java.lang.String endPoint()
      • credentials

        @Deprecated
        public java.lang.String credentials()
        Deprecated.
      • overrides

        public java.util.Properties overrides()
      • authValue

        public java.lang.String authValue()
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException