Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE
Highlighted
Super Contributor.. ellerm Super Contributor..
Super Contributor..
3624 views

MSBUILD Fortify Scan on Jenkins

When I run a msbuild scan job for .NET projects on a Jenkins server using the Windows Command Line option I get this message after the translation has finished and when the scan starts.  This works fine when I run all the commands via the command line.

[error]: Unable to load build session with ID "trust-external-AutomatedDisbursement-trunk". See log file for more details.
Finished

Does anyone know how to solve this issue.  My script runs the following commands.  You can see that buildid is set but somewhere along the line once the translation is complete the scan can't see the buildid.

REM ###########################################################################

echo Cleaning previous scan artifacts

%SOURCEANALYZER% %MEMORY% %LAUNCHERSWITCHES% -b %BUILDID% -clean

)

REM ###########################################################################

echo Running Build Integration

%SOURCEANALYZER% %MEMORY% %LAUNCHERSWITCHES% -b %BUILDID%  "C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" "D:\Jenkins\.jenkins\workspace\trust-external-AutomatedDisbursement-trunk\AD.sln" /p:Configuration="PROD" /p:Platform="Any CPU" /target:"rebuild" /p:VisualStudioVersion=14.0

)

REM ###########################################################################

echo Starting scan

%SOURCEANALYZER% %MEMORY% %LAUNCHERSWITCHES% -b %BUILDID% -scan -f %FPR%

)

Labels (3)
0 Likes
2 Replies
mfeferman
New Member.

Re: MSBUILD Fortify Scan on Jenkins

Have you manually run the script (to do only the translation) and then do a "-show-files" to see what actually got translated?

0 Likes
Trusted Contributor.. stephen.b.burri Trusted Contributor..
Trusted Contributor..

Re: MSBUILD Fortify Scan on Jenkins

To add to what Mark Feferman said:

One of the times this issue comes up is when the translation command does not translate any files.  The way too check for this is, after running a translation command (in your case the MSBUILD command) you would use the "-show-files" option with your build idea, in your case "sourceanalyzer -b trust-external-AutomatedDisbursement-trunk -show-files"

Questions that come to my mind, does MSBUILD build complete successfully?  Sometimes committed source code breaks the build (I may or may not have done this on occasion in the past).  This is the normal cause of the translation fail in my experience when using MSBUILD.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.