diff --git a/README.md b/README.md index 380b39d..fc30e34 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,12 @@ Veracode recommends that you use the toplevel parameter if you want to ensure th * 2: delete a scan of any status except Results Ready to proceed with the uploadandscan action. If errors occur when running this action, the Java wrapper automatically deletes the incomplete scan. **Optional** With the scan deleted automatically, you can create subsequent scans without having to manually delete an incomplete scan. - + +### `scanpollinginterval` + +**Optional** INTEGER - Interval, in seconds, to poll for the status of a running scan. Value range is 30 to 120 (two minutes). Default is 120. + + ### `javawrapperversion` **Optional** STRING - Allows specifying the version of the Java API Wrapper used by the script to call the Veracode APIs. The default is to use the latest released version of the Veracode Java API Wrapper, as [published in Maven Central](https://search.maven.org/search?q=a:vosp-api-wrappers-java). An example of the version string format is `22.5.10.1`. diff --git a/action.yml b/action.yml index c1b91d6..39b5028 100644 --- a/action.yml +++ b/action.yml @@ -67,6 +67,9 @@ inputs: deleteincompletescan: description: 'automatically delete the current scan if there are any errors when uploading files or starting the scan' required: false + scanpollinginterval: + description: 'Interval, in seconds, to poll for the status of a running scan. Value range is 30 to 120 (two minutes). Default is 120.' + required: false javawrapperversion: description: 'specify version of the Java API Wrapper; default is latest' required: false @@ -104,5 +107,6 @@ runs: - ${{ inputs.teams }} - ${{ inputs.toplevel }} - ${{ inputs.deleteincompletescan }} + - ${{ inputs.scanpollinginterval }} - ${{ inputs.javawrapperversion }} - ${{ inputs.debug }} diff --git a/entrypoint.sh b/entrypoint.sh index 96c786c..3b82c9d 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -25,8 +25,9 @@ selectedpreviously=${18} teams=${19} toplevel=${20} deleteincompletescan=${21} -javawrapperversion=${22} -debug=${23} +scanpollinginterval=${22} +javawrapperversion=${23} +debug=${24} echo "Required Information" @@ -66,8 +67,9 @@ echo "selectedpreviously: ${18}" echo "teams: ${19}" echo "toplevel: ${20}" echo "deleteincompletescan: ${21}" -echo "javawrapperversion: ${22}" -echo "debug: ${23}" +echo "scanpollinginterval: ${22}" +echo "javawrapperversion: ${23}" +echo "debug: ${24}" #Check if required parameters are set @@ -232,6 +234,12 @@ then fi +if [ "$scanpollinginterval" ] +then + echo " -scanpollinginterval \"$scanpollinginterval\" \\" >> runJava.sh +fi + + echo " -createprofile \"$createprofile\" \\" >> runJava.sh if [ "$javawrapperversion" ]