Reputation: 588
Currently on TeamCity we have a Fortify scan as one of the build steps. Upon completion of the scan I parse through the .xml
doc and get the vulnerability count from the scan. As of right now the count is echoed back to the build logs in TeamCity.
My question is how can I take that vulnerability count and include that in the notification email? I don't want to have to build a whole new email template for just a single variable that I want to include. I know I can extend the notification template model, but is this the easiest way of adding the variable? The Fortify scan is ran from a batch file, could there be an easier way to maybe set a global variable to retrieve the count in TeamCity?
Upvotes: 0
Views: 146
Reputation: 1832
Add the number to the build status text by printing a line with the service message into stdout:
##teamcity[buildStatus text='Fortify: <number>; {build.status.text}']
This way the result will be immediately visible in the list of builds nd the build notifications.
Upvotes: 1