Package htmlpublisher
Class HtmlPublisher
- java.lang.Object
-
- hudson.tasks.BuildStepCompatibilityLayer
-
- hudson.tasks.Publisher
-
- hudson.tasks.Recorder
-
- htmlpublisher.HtmlPublisher
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<Publisher>
,BuildStep
public class HtmlPublisher extends Recorder
Saves HTML reports for the project and publishes them.- Author:
- Kohsuke Kawaguchi, Mike Rooney
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HtmlPublisher.DescriptorImpl
-
Nested classes/interfaces inherited from class hudson.tasks.Publisher
Publisher.DescriptorExtensionListImpl
-
Nested classes/interfaces inherited from interface hudson.tasks.BuildStep
BuildStep.PublisherList
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
-
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
-
-
Constructor Summary
Constructors Constructor Description HtmlPublisher(List<HtmlPublisherTarget> reportTargets)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DirScanner
dirScannerGlob(String includes, String excludes, boolean useDefaultExcludes, OpenOption... openOptions)
Collection<? extends Action>
getProjectActions(AbstractProject<?,?> project)
List<HtmlPublisherTarget>
getReportTargets()
BuildStepMonitor
getRequiredMonitorService()
boolean
perform(AbstractBuild<?,?> build, Launcher launcher, BuildListener listener)
static boolean
publishReports(Run<?,?> build, FilePath workspace, TaskListener listener, List<HtmlPublisherTarget> reportTargets, Class<?> publisherClass)
Runs HTML the publishing operation for specifiedHtmlPublisherTarget
s.List<String>
readFile(String filePath)
static List<String>
readFile(String filePath, Class<?> publisherClass)
protected static String
resolveParametersInString(EnvVars envVars, TaskListener listener, String input)
protected static String
resolveParametersInString(Run<?,?> build, TaskListener listener, String input)
-
Methods inherited from class hudson.tasks.Recorder
getDescriptor
-
Methods inherited from class hudson.tasks.Publisher
all, getProjectAction, needsToRunAfterFinalized, prebuild
-
Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, perform, prebuild
-
-
-
-
Constructor Detail
-
HtmlPublisher
@DataBoundConstructor @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public HtmlPublisher(List<HtmlPublisherTarget> reportTargets)
-
-
Method Detail
-
getReportTargets
public List<HtmlPublisherTarget> getReportTargets()
-
readFile
public List<String> readFile(String filePath) throws IOException
- Throws:
IOException
-
readFile
public static List<String> readFile(String filePath, Class<?> publisherClass) throws IOException
- Throws:
IOException
-
resolveParametersInString
protected static String resolveParametersInString(Run<?,?> build, TaskListener listener, String input)
-
resolveParametersInString
protected static String resolveParametersInString(EnvVars envVars, TaskListener listener, String input)
-
perform
public boolean perform(AbstractBuild<?,?> build, Launcher launcher, BuildListener listener) throws InterruptedException
- Specified by:
perform
in interfaceBuildStep
- Overrides:
perform
in classBuildStepCompatibilityLayer
- Throws:
InterruptedException
-
publishReports
public static boolean publishReports(Run<?,?> build, FilePath workspace, TaskListener listener, List<HtmlPublisherTarget> reportTargets, Class<?> publisherClass) throws InterruptedException
Runs HTML the publishing operation for specifiedHtmlPublisherTarget
s.- Returns:
- False if the operation failed
- Throws:
InterruptedException
-
getProjectActions
@NonNull public Collection<? extends Action> getProjectActions(AbstractProject<?,?> project)
- Specified by:
getProjectActions
in interfaceBuildStep
- Overrides:
getProjectActions
in classBuildStepCompatibilityLayer
-
dirScannerGlob
@SuppressRestrictedWarnings(org.kohsuke.accmod.restrictions.NoExternalUse.class) public static DirScanner dirScannerGlob(String includes, String excludes, boolean useDefaultExcludes, OpenOption... openOptions) throws Exception
- Throws:
Exception
-
getRequiredMonitorService
public BuildStepMonitor getRequiredMonitorService()
-
-