Skip to main content

Veracode Jenkins Plugin script parameters

This table describes the parameters and their values for using the Jenkins Plugin in a build script. The script is Apache Groovy.

ParameterTypeDescription
applicationName
Required
StringName of the application profile.
scanName
Required
StringName of the scan. You can enter the $buildnumber or $projectname variables to dynamically bind the build number or project name to the scan name, instead of using a fixed scan name.
uploadIncludesPattern
Required
StringInclude filepath patterns of the files you want to upload and scan. Use a comma-separated list of Ant-style include patterns relative to the job workspace directory.
vid
Required
StringVeracode API ID. If you bound your credentials, the environment variable bound to the API ID.
vkey
Required
StringVeracode API key. If you bound your credentials, the environment variable bound to the API key.
canFailJobBooleanSet to true if you want the entire Jenkins job to fail if the upload and scan with Veracode action fails. If set to false and the upload and scan with Veracode action fails, Jenkins completes the job, logs the failure, but does not notify you about the failure.
copyRemoteFilesBooleanIf set to false (default), the plugin uploads the output files to Veracode from the remote workspace.

If set to true, the plugin copies the output files from the remote machine to a local, temporary directory on the controller server and uploads to Veracode.

NOTE:
Veracode does not recommend enabling this option as it can increase the load on your Jenkins controller server.
createProfileBooleanCreate a Veracode application profile, if one does not exist, for the specified application profile name. Set to true to create a profile. Set to false to not create a profile.
createSandboxBooleanFor development sandbox scans, create a sandbox for the specified Veracode application. Set to true to create a sandbox. Set to false to not create a sandbox.
criticalityStringRequired if you include the createProfile parameter. Criticality level of the scan: VeryHigh, High, Medium, Low, VeryLow
deleteIncompleteScanLevelStringAutomatically delete an incomplete scan based on its status to allow the uploadandscan action to continue processing. You can review the status of a scan in the Jenkins logs.
To delete scans, you must have a user account with the Delete Scans role or an API service account with the Upload and Scan role.

One of these values:
  • 0: do not delete an incomplete scan when running the uploadandscan action. The default. If set, you must delete an incomplete scan manually to proceed with the uploadandscan action.
  • 1: delete a scan with a status of incomplete, no modules defined, failed, or canceled to proceed with the uploadandscan action. If errors occur when running this action, the Jenkins plugin automatically deletes the incomplete scan.
  • 2: delete a scan of any status except Results Ready to proceed with the uploadandscan action. If errors occur when running this action, the Jenkins plugin automatically deletes the incomplete scan.

debugBooleanSet to true to include detailed build information in the Jenkins console logs for debugging. Set to false to not include detailed build information in the logs.
fileNamePatternStringCase-sensitive filename pattern that represents the names of uploaded files to save with a different name. The * wildcard matches 0 or more characters. The ? wildcard matches exactly one character. Each wildcard corresponds to a numbered group that you can reference in the replacement pattern.
pHostStringRequired if you include the useProxy parameter. Hostname of your proxy host.
pPasswordStringRequired if you include the useProxy parameter. Password for the proxy host.
pPortIntegerRequired if you include the useProxy parameter. Port number for the proxy host.
pUserStringRequired if you include the useProxy parameter. Username for the proxy host.
replacementPatternStringReplacement pattern that references groups captured by the filename pattern. For example, if the filename pattern is --SNAPSHOT.war and the replacement pattern is $1-master-SNAPSHOT.war, an uploaded file named app-branch-SNAPSHOT.war is saved as app-master-SNAPSHOT.war.
sandboxNameStringFor development sandbox scans, the name of the sandbox in which to run the scan. If the sandbox does not exist, include createSandbox to create it with the specified name.
scanExcludesPatternStringCase-sensitive, comma-separated list of module name patterns that represent the names of modules to not scan as top-level modules. The * wildcard matches 0 or more characters. The ? wildcard matches exactly one character.
scanIncludesPatternStringCase-sensitive, comma-separated list of module name patterns that represent the names of modules to scan as top-level modules. The * wildcard matches 0 or more characters. The ? wildcard matches exactly one character.
teamsStringComma-separated list of team names associated with the specified application. Validates against the names of existing teams for this account.
timeoutIntegerNumber of minutes to wait for the scan to complete and pass policy. If the scan does not complete or fails policy, the build fails. Default is 60 minutes.
uploadExcludesPatternStringExclude filepath patterns of the files you do not want to upload and scan. Use a comma-separated list of Ant-style include patterns relative to the job workspace directory.
useProxyBooleanSet to true if using a proxy to access Veracode. If set to true, these parameters are required: pHost, pPassword, pPort, pUser
waitForScanBooleanSet to true to submit the scan and have the Jenkins job wait for the amount of time, in minutes, specified for the timeout parameter. If the scan does not complete and pass policy compliance within the specified time, the build fails.