I have a bamboo plan that executes Fortify code scans and uploads the generated fortify .fpr report to the Fortify SSC server. I have Maven 3.x tasks defined to use my pom.xmls to do a clean build and run the fortify scans and then upload the scan report to the Fortify server.
For the Maven 3.x task to upload the generated fortify reports - I have the goal defined as com.hpe.security.fortify.maven.plugin:sca-maven-plugin:upload -Dfortify.ssc.sscUploadToken=${bamboo.sscUploadToken}.
For the maven tasks in Advanced Options - I have 'Use Maven return code' checked
At run time my bamboo job run - has the status of success even though bamboo if fails to upload the generated Fortify report (the return exit code is 52 or non zero - however Maven returns BUILD SUCCESS). At run time the logs indicate that my above command in goal translates to:
[INFO] Executing Command: /bin/sh -c cd /dts/tools/bamboo-agent-fortify-4/xml-data/build-dir/FS-FFFY18JULY0531-DTAMFSJ/dta-maint && fortifyclient uploadFPR -f /dts/tools/bamboo-agent-fortify-4/xml-data/build-dir/FS-FFFY18JULY0531-DTAMFSJ/dta-maint/target/fortify/com-ngc-dts-dta-maint-FY18-MAY-SNAPSHOT.fpr -project DTS-DTA-Maintenance -version FY18-April -authtoken c0faed4c-70d9-410a-86a6-55bb8012c8e1 -url http://192.168.103.218
31-May-2018 11:43:25
The specified application version does not exist.
31-May-2018 11:43:25
[ERROR] Command exited with code 52.
31-May-2018 11:43:25
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
///////////////////////////////////////////////////////////////////////////////////
Any suggestions please to fix this with Maven task? Or any other alternatives?