Class SupportPlugin

  • All Implemented Interfaces:
    Saveable, org.kohsuke.stapler.StaplerProxy

    public class SupportPlugin
    extends Plugin
    Main entry point for the support plugin.
    Author:
    Stephen Connolly
    • Field Detail

      • REMOTE_OPERATION_TIMEOUT_MS

        public static final int REMOTE_OPERATION_TIMEOUT_MS
        How long remote operations can block support bundle generation for.
      • REMOTE_OPERATION_CACHE_TIMEOUT_SEC

        public static final int REMOTE_OPERATION_CACHE_TIMEOUT_SEC
        How long remote operations fallback caching can wait for
      • AUTO_BUNDLE_PERIOD_HOURS

        public static final int AUTO_BUNDLE_PERIOD_HOURS
        How often automatic support bundles should be collected. Should be 1 unless you have very good reason to use a different period. 0 disables bundle generation and 24 is the longest period permitted.
      • SUPPORT_PERMISSIONS

        public static final PermissionGroup SUPPORT_PERMISSIONS
    • Constructor Detail

      • SupportPlugin

        public SupportPlugin()
    • Method Detail

      • getRootDirectory

        public static File getRootDirectory()
        Working directory that the support-core plugin uses to write out files.
        Returns:
        the working directory that the support-core plugin uses to write out files.
      • getLogsDirectory

        public static File getLogsDirectory()
        Working directory that the support-core plugin uses to write out log files.
        Returns:
        the working directory that the support-core plugin uses to write out log files.
      • getRequesterAuthentication

        public static org.springframework.security.core.Authentication getRequesterAuthentication()
      • setRequesterAuthentication

        public static void setRequesterAuthentication​(org.springframework.security.core.Authentication authentication)
      • clearRequesterAuthentication

        public static void clearRequesterAuthentication()
      • getExcludedComponents

        public Set<String> getExcludedComponents()
      • setExcludedComponents

        public void setExcludedComponents​(Set<String> excludedComponents)
                                   throws IOException
        Sets the ids of the components to be excluded.
        Parameters:
        excludedComponents - Component Ids (by default class names) to exclude.
        Throws:
        IOException - if an error occurs while saving the configuration.
        See Also:
        Component.getId()
      • getJenkinsExecutorTotalCount

        public com.codahale.metrics.Histogram getJenkinsExecutorTotalCount()
      • getJenkinsExecutorUsedCount

        public com.codahale.metrics.Histogram getJenkinsExecutorUsedCount()
      • getJenkinsNodeOnlineCount

        public com.codahale.metrics.Histogram getJenkinsNodeOnlineCount()
      • getJenkinsNodeTotalCount

        public com.codahale.metrics.Histogram getJenkinsNodeTotalCount()
      • setLogLevel

        public static void setLogLevel​(String level)
      • setLogLevel

        public static void setLogLevel​(Level level)
      • writeBundle

        @Deprecated
        public static void writeBundle​(OutputStream outputStream)
                                throws IOException
        Deprecated.
        Generate a bundle for all components that are selected in the Global Configuration.
        Parameters:
        outputStream - an OutputStream
        Throws:
        IOException - if an error occurs while generating the bundle.
      • writeBundle

        public static void writeBundle​(OutputStream outputStream,
                                       List<? extends Component> components)
                                throws IOException
        Generate a bundle for all components that are selected in the Global Configuration.
        Parameters:
        outputStream - an OutputStream
        components - a list of Component to include in the bundle
        Throws:
        IOException - if an error occurs while generating the bundle.
      • getContentFilter

        public static Optional<ContentFilter> getContentFilter()
        Get the filter to be used in an Optional just in case.
        Returns:
        the filter.
      • completedMilestones

        @Deprecated
        @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
        public static void completedMilestones()
                                        throws IOException
        Deprecated.
        Throws:
        IOException