org.jenkinsci.plugins.DependencyCheck
Class AbstractDependencyCheckBuilder
java.lang.Object
hudson.tasks.BuildStepCompatibilityLayer
hudson.tasks.Builder
org.jenkinsci.plugins.DependencyCheck.AbstractDependencyCheckBuilder
- All Implemented Interfaces:
- hudson.ExtensionPoint, hudson.model.Describable<hudson.tasks.Builder>, hudson.tasks.BuildStep
- Direct Known Subclasses:
- DependencyCheckBuilder, DependencyCheckUpdateOnlyBuilder
public abstract class AbstractDependencyCheckBuilder
- extends hudson.tasks.Builder
| Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson |
| Nested classes/interfaces inherited from interface hudson.tasks.BuildStep |
hudson.tasks.BuildStep.PublisherList |
| Fields inherited from interface hudson.tasks.BuildStep |
BUILDERS, PUBLISHERS |
|
Method Summary |
protected boolean |
configureDataDirectory(hudson.model.AbstractBuild build,
hudson.model.BuildListener listener,
Options options,
String dataDir)
By default, DependencyCheck will place the 'data' directory in the same directory
as the DependencyCheck JAR. |
protected void |
configureDataMirroring(Options options,
int dataMirroringType,
String cveUrl12Modified,
String cveUrl20Modified,
String cveUrl12Base,
String cveUrl20Base)
|
protected void |
configureProxySettings(Options options,
boolean isNvdProxyBypassed)
|
boolean |
isMaven(Class<? extends hudson.model.AbstractProject> clazz)
Convenience method that determines if the project is a Maven project. |
protected Options |
optionsBuilder(hudson.model.AbstractBuild build,
hudson.model.BuildListener listener,
String outdir,
boolean isVerboseLoggingEnabled,
String tempPath)
Generate Options from build configuration preferences that will be passed to
the build step in DependencyCheck |
boolean |
perform(hudson.model.AbstractBuild build,
hudson.Launcher launcher,
hudson.model.BuildListener listener)
This method is called whenever the DependencyCheck build step is executed. |
void |
setOptions(Options options)
Set options to be used for the Builder step |
protected String |
substituteVariable(hudson.model.AbstractBuild build,
hudson.model.BuildListener listener,
String parameterizedValue)
Replace a Jenkins environment variable in the form ${name} contained in the
specified String with the value of the matching environment variable. |
protected String |
toCommaSeparatedString(String input)
|
| Methods inherited from class hudson.tasks.Builder |
all, getDescriptor, getRequiredMonitorService, prebuild |
| Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer |
getProjectAction, getProjectAction, getProjectActions, perform, prebuild |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OUT_TAG
protected static final String OUT_TAG
- See Also:
- Constant Field Values
skipOnScmChange
protected boolean skipOnScmChange
skipOnUpstreamChange
protected boolean skipOnUpstreamChange
AbstractDependencyCheckBuilder
public AbstractDependencyCheckBuilder()
setOptions
public void setOptions(Options options)
- Set options to be used for the Builder step
- Parameters:
options - Options
perform
public boolean perform(hudson.model.AbstractBuild build,
hudson.Launcher launcher,
hudson.model.BuildListener listener)
throws InterruptedException,
IOException
- This method is called whenever the DependencyCheck build step is executed.
- Specified by:
perform in interface hudson.tasks.BuildStep- Overrides:
perform in class hudson.tasks.BuildStepCompatibilityLayer
- Parameters:
build - A Build objectlauncher - A Launcher objectlistener - A BuildListener object
- Returns:
- A true or false value indicating if the build was successful or if it failed
- Throws:
InterruptedException
IOException
isMaven
public boolean isMaven(Class<? extends hudson.model.AbstractProject> clazz)
- Convenience method that determines if the project is a Maven project.
- Parameters:
clazz - The projects class
configureDataDirectory
protected boolean configureDataDirectory(hudson.model.AbstractBuild build,
hudson.model.BuildListener listener,
Options options,
String dataDir)
- By default, DependencyCheck will place the 'data' directory in the same directory
as the DependencyCheck JAR. We need to overwrite these settings and account for
the fact that in a multi-node Jenkins cluster, a centralized data directory may
not be possible. Therefore, a subdirectory in the builds workspace is used.
- Returns:
- A boolean indicating if any errors occurred during the validation process
optionsBuilder
protected Options optionsBuilder(hudson.model.AbstractBuild build,
hudson.model.BuildListener listener,
String outdir,
boolean isVerboseLoggingEnabled,
String tempPath)
- Generate Options from build configuration preferences that will be passed to
the build step in DependencyCheck
- Parameters:
build - an AbstractBuild object
- Returns:
- DependencyCheck Options
configureProxySettings
protected void configureProxySettings(Options options,
boolean isNvdProxyBypassed)
configureDataMirroring
protected void configureDataMirroring(Options options,
int dataMirroringType,
String cveUrl12Modified,
String cveUrl20Modified,
String cveUrl12Base,
String cveUrl20Base)
substituteVariable
protected String substituteVariable(hudson.model.AbstractBuild build,
hudson.model.BuildListener listener,
String parameterizedValue)
- Replace a Jenkins environment variable in the form ${name} contained in the
specified String with the value of the matching environment variable.
toCommaSeparatedString
protected String toCommaSeparatedString(String input)
Copyright © 2012-2015 OWASP. All Rights Reserved.