Package com.cloudbees.jenkins.support
Class SupportPlugin
java.lang.Object
hudson.Plugin
com.cloudbees.jenkins.support.SupportPlugin
Main entry point for the support plugin.
- Author:
- Stephen Connolly
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
static class
static class
static class
static class
Nested classes/interfaces inherited from class hudson.Plugin
Plugin.DummyImpl
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
How often automatic support bundles should be collected.static final Permission
Deprecated.static final int
How long remote operations fallback caching can wait forstatic final int
How long remote operations can block support bundle generation for.static final String
static final PermissionGroup
Fields inherited from class hudson.Plugin
SKIP_PERMISSION_CHECK
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
static void
Deprecated.getAllLogRecords
(Node node) static String
Deprecated.useBundleFileName.generate()
insteadstatic ExtensionList<Component>
static Optional<ContentFilter>
Deprecated.use getDefaultContentFilter()static Optional<ContentFilter>
getContentFilter
(boolean ensureLoaded) Deprecated.use getDefaultContentFilter(ensureLoaded)Deprecated.usage removedstatic ContentFilter
Get the currentContentFilter
.static ContentFilter
getDefaultContentFilter
(boolean ensureLoaded) Get the filter to be used.static SupportPlugin
com.codahale.metrics.Histogram
com.codahale.metrics.Histogram
com.codahale.metrics.Histogram
com.codahale.metrics.Histogram
static File
Working directory that the support-core plugin uses to write out log files.static org.springframework.security.core.Authentication
static File
Working directory that the support-core plugin uses to write out files.static void
static void
void
setExcludedComponents
(Set<String> excludedComponents) Sets the ids of the components to be excluded.static void
setLogLevel
(String level) static void
setLogLevel
(Level level) static void
setRequesterAuthentication
(org.springframework.security.core.Authentication authentication) void
setSupportProvider
(SupportProvider supportProvider) void
start()
void
stop()
static void
static void
writeBundle
(OutputStream outputStream) Deprecated.static void
writeBundle
(OutputStream outputStream, List<? extends Component> components) Generate a bundle for all components that are selected in the Global Configuration.static void
writeBundle
(OutputStream outputStream, List<? extends Component> components, ComponentVisitor componentConsumer) Generate a bundle for all components that are selected in the Global Configuration.Methods inherited from class hudson.Plugin
configure, configure, doDynamic, getConfigXml, getTarget, getWrapper, load, postInitialize, save, setServletContext
-
Field Details
-
REMOTE_OPERATION_TIMEOUT_MS
public static final int REMOTE_OPERATION_TIMEOUT_MSHow long remote operations can block support bundle generation for. -
REMOTE_OPERATION_CACHE_TIMEOUT_SEC
public static final int REMOTE_OPERATION_CACHE_TIMEOUT_SECHow long remote operations fallback caching can wait for -
AUTO_BUNDLE_PERIOD_HOURS
public static final int AUTO_BUNDLE_PERIOD_HOURSHow often automatic support bundles should be collected. Should be1
unless you have very good reason to use a different period.0
disables bundle generation and24
is the longest period permitted. -
SUPPORT_PERMISSIONS
-
CREATE_BUNDLE
Deprecated.not used anymore as the usage has now been limited toJenkins.ADMINISTER
-
SUPPORT_DIRECTORY_NAME
- See Also:
-
-
Constructor Details
-
SupportPlugin
public SupportPlugin()
-
-
Method Details
-
migrateExistingLogs
-
getSupportProvider
-
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
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() -
setSupportProvider
- Throws:
IOException
-
getExcludedComponents
-
setExcludedComponents
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:
-
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
-
setLogLevel
-
getInstance
-
getComponents
-
writeBundle
Deprecated.Generate a bundle for all components that are selected in the Global Configuration.- Parameters:
outputStream
- anOutputStream
- 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
- anOutputStream
components
- a list ofComponent
to include in the bundle- Throws:
IOException
- if an error occurs while generating the bundle.
-
writeBundle
public static void writeBundle(OutputStream outputStream, List<? extends Component> components, ComponentVisitor componentConsumer) throws IOException Generate a bundle for all components that are selected in the Global Configuration.- Parameters:
outputStream
- anOutputStream
components
- a list ofComponent
to include in the bundlecomponentConsumer
- aComponentVisitor
- Throws:
IOException
- if an error occurs while generating the bundle.
-
getContentFilter
Deprecated.use getDefaultContentFilter()Get the filter to be used in anOptional
just in case.- Returns:
- the filter.
-
getContentFilter
Deprecated.use getDefaultContentFilter(ensureLoaded)Get the filter to be used in anOptional
just in case.- Parameters:
ensureLoaded
- true to ensure that the filter is loaded. Not necessary ifContentFilter.reload()
is done explicitly by the caller.- Returns:
- the filter.
-
getDefaultContentFilter
Get the currentContentFilter
.- Returns:
- the
ContentFilter
or a pass-through filter if anonymization is off
-
getDefaultContentFilter
Get the filter to be used.- Parameters:
ensureLoaded
- true to ensure that the filter is loaded. Not necessary ifContentFilter.reload()
is done explicitly by the caller.- Returns:
- the filter.
-
getAllLogRecords
-
loadConfig
@Initializer(after=EXTENSIONS_AUGMENTED, before=JOB_LOADED) public static void loadConfig() throws IOException- Throws:
IOException
-
completedMilestones
@Deprecated @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public static void completedMilestones() throws IOExceptionDeprecated.- Throws:
IOException
-
threadDumpStartup
- Throws:
Exception
-
start
-
getContext
Deprecated.usage removed- Returns:
- the
SupportContext
-
stop
-
getAllLogRecords
- Throws:
IOException
InterruptedException
-
getBundleFileName
Deprecated.useBundleFileName.generate()
insteadReturns the full bundle name.- Returns:
- the full bundle name.
-
Jenkins.ADMINISTER