Package com.vrondakis.zap
Class ZapArchive
- java.lang.Object
-
- hudson.tasks.BuildStepCompatibilityLayer
-
- hudson.tasks.Publisher
-
- hudson.tasks.Recorder
-
- com.vrondakis.zap.ZapArchive
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<Publisher>
,BuildStep
public class ZapArchive extends Recorder
ZapArchiver Main zap class, handles generating report.
-
-
Nested Class Summary
-
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 Modifier and Type Field Description static int
ALL_ALERT
static int
HIGH_ALERT
static int
LOW_ALERT
static int
MEDIUM_ALERT
-
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
-
-
Constructor Summary
Constructors Constructor Description ZapArchive(Run<?,?> run, PrintStream logger)
ZapArchive(Run<?,?> run, PrintStream logger, ZapDriver zapDriver)
-
Method Summary
Modifier and Type Method Description void
archiveRawReport(Run<?,?> dir, Job<?,?> job, FilePath workspace, TaskListener taskListener, String falsePositivesFilePath)
Archives the current raw ZAP JSON report & saves static filesBuildStepMonitor
getRequiredMonitorService()
boolean
shouldFailBuild(TaskListener listener)
Review the report, and fail the build according to given fail build parameters-
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, getProjectActions, perform, perform, prebuild
-
-
-
-
Field Detail
-
HIGH_ALERT
public static final int HIGH_ALERT
- See Also:
- Constant Field Values
-
MEDIUM_ALERT
public static final int MEDIUM_ALERT
- See Also:
- Constant Field Values
-
LOW_ALERT
public static final int LOW_ALERT
- See Also:
- Constant Field Values
-
ALL_ALERT
public static final int ALL_ALERT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ZapArchive
public ZapArchive(Run<?,?> run, PrintStream logger)
-
ZapArchive
public ZapArchive(Run<?,?> run, PrintStream logger, ZapDriver zapDriver)
-
-
Method Detail
-
archiveRawReport
public void archiveRawReport(Run<?,?> dir, @Nonnull Job<?,?> job, FilePath workspace, @Nonnull TaskListener taskListener, String falsePositivesFilePath) throws ZapExecutionException
Archives the current raw ZAP JSON report & saves static files- Parameters:
dir
- the current run directoryjob
- the current jenkins jobworkspace
- filepath to the current workspacetaskListener
- LoggingfalsePositivesFilePath
- path to the false positives file- Throws:
ZapExecutionException
-
shouldFailBuild
public boolean shouldFailBuild(TaskListener listener)
Review the report, and fail the build according to given fail build parameters- Parameters:
listener
- - Logging- Returns:
- If the build should be failed
-
getRequiredMonitorService
public BuildStepMonitor getRequiredMonitorService()
-
-