Package com.veracode.jenkins.plugin.args
Class UploadAndScanArgs
- java.lang.Object
-
- com.veracode.jenkins.plugin.args.AbstractArgs
-
- com.veracode.jenkins.plugin.args.UploadAndScanArgs
-
public final class UploadAndScanArgs extends AbstractArgs
The UploadAndScanArgs class builds the command line argument passed to the Veracode API wrapper that causes it to upload binaries, start the pre-scan, and if the pre-scan is successful, start the scan.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addUserAgent(String userAgent)
Adds user agent details got through API.static String
getDeleteIncompleteScan(String deleteIncompleteScan)
This method will handle the backward compatibility of deleteIncompleteScan.static UploadAndScanArgs
newUploadAndScanArgs(boolean bRemoteScan, boolean autoApplicationName, boolean autoDescription, boolean autoScanName, boolean createSandbox, boolean createProfile, String teams, boolean useProxy, String vId, String vKey, String buildNumber, String projectName, String applicationName, String sandboxName, String scanName, String criticality, String scanIncludesPattern, String scanExcludesPattern, String fileNamePattern, String replacementPattern, String pHost, String pPort, String pUser, String pCredential, FilePath workspace, EnvVars envVars, String timeOut, String deleteIncompleteScan, boolean debug, String[] filePaths)
Returns an UploadAndScanArgs object initialized with the specified arguments.static UploadAndScanArgs
newUploadAndScanArgs(VeracodeNotifier notifier, AbstractBuild<?,?> build, EnvVars envVars, String[] filePaths, boolean bRemoteScan)
Returns an UploadAndScanArgs object initialized with the specified arguments.static UploadAndScanArgs
newUploadAndScanArgs(VeracodePipelineRecorder vpr, Run<?,?> run, FilePath workspace, EnvVars envVars, String[] filePaths, boolean bRemoteScan, boolean autoApplicationName, boolean autoScanName, boolean createAutoApplicationDescription)
Returns an UploadAndScanArgs object initialized with the specified arguments.static void
setEnvVars(EnvVars envVars, String buildNumber, String projectName)
Sets our custom environment variables.-
Methods inherited from class com.veracode.jenkins.plugin.args.AbstractArgs
addAction, addApiCredentials, addProxyConfiguration, addProxyConfiguration, addProxyCredentials, getArguments, getMaskedArguments
-
-
-
-
Field Detail
-
CUSTOM_PROJECT_NAME_VAR
public static final String CUSTOM_PROJECT_NAME_VAR
- See Also:
- Constant Field Values
-
-
Method Detail
-
addUserAgent
protected void addUserAgent(String userAgent)
Adds user agent details got through API.- Parameters:
userAgent
- aString
object.
-
newUploadAndScanArgs
public static UploadAndScanArgs newUploadAndScanArgs(VeracodeNotifier notifier, AbstractBuild<?,?> build, EnvVars envVars, String[] filePaths, boolean bRemoteScan)
Returns an UploadAndScanArgs object initialized with the specified arguments. Used by the VeracodeNotifier.- Parameters:
notifier
- aVeracodeNotifier
object.build
- aAbstractBuild
object.envVars
- aEnvVars
object.filePaths
- an array ofString
objects.bRemoteScan
- a boolean.- Returns:
- a
UploadAndScanArgs
object.
-
newUploadAndScanArgs
public static UploadAndScanArgs newUploadAndScanArgs(VeracodePipelineRecorder vpr, Run<?,?> run, FilePath workspace, EnvVars envVars, String[] filePaths, boolean bRemoteScan, boolean autoApplicationName, boolean autoScanName, boolean createAutoApplicationDescription)
Returns an UploadAndScanArgs object initialized with the specified arguments. Used by the VeracodePipelineRecorder.- Parameters:
vpr
- aVeracodePipelineRecorder
object.run
- aRun
object.workspace
- aFilePath
object.envVars
- aEnvVars
object.filePaths
- an array ofString
objects.bRemoteScan
- a boolean.autoApplicationName
- a boolean.autoScanName
- a boolean.createAutoApplicationDescription
- a boolean.- Returns:
- a
UploadAndScanArgs
object.
-
newUploadAndScanArgs
public static UploadAndScanArgs newUploadAndScanArgs(boolean bRemoteScan, boolean autoApplicationName, boolean autoDescription, boolean autoScanName, boolean createSandbox, boolean createProfile, String teams, boolean useProxy, String vId, String vKey, String buildNumber, String projectName, String applicationName, String sandboxName, String scanName, String criticality, String scanIncludesPattern, String scanExcludesPattern, String fileNamePattern, String replacementPattern, String pHost, String pPort, String pUser, String pCredential, FilePath workspace, EnvVars envVars, String timeOut, String deleteIncompleteScan, boolean debug, String[] filePaths)
Returns an UploadAndScanArgs object initialized with the specified arguments.- Parameters:
bRemoteScan
- a boolean.autoApplicationName
- a boolean.autoDescription
- a boolean.autoScanName
- a boolean.createSandbox
- a boolean.createProfile
- a boolean.teams
- aString
object.useProxy
- a boolean.vId
- aString
object.vKey
- aString
object.buildNumber
- aString
object.projectName
- aString
object.applicationName
- aString
object.sandboxName
- aString
object.scanName
- aString
object.criticality
- aString
object.scanIncludesPattern
- aString
object.scanExcludesPattern
- aString
object.fileNamePattern
- aString
object.replacementPattern
- aString
object.pHost
- aString
object.pPort
- aString
object.pUser
- aString
object.pCredential
- aString
object.workspace
- aFilePath
object.envVars
- aEnvVars
object.debug
- a boolean.timeOut
- aString
object.deleteIncompleteScan
- aString
object.filePaths
- an array ofString
objects.- Returns:
- a
UploadAndScanArgs
object.
-
setEnvVars
public static void setEnvVars(EnvVars envVars, String buildNumber, String projectName)
Sets our custom environment variables.
-
-