How do I pass Istanbul code coverage reports from Bamboo Sonar Scanner task? Edited

Our Bamboo build plan runs several npm tasks, one of which runs tests and creates an Istanbul code coverage report.  There is no Java, just an Angular application.  We want our Sonar Scanner task to pass the results of this test to our Sonar instance.  One of the artifacts of the npm Bamboo tasks is a folder called coverage that contains an html version of the report and some other files (lcov.info).  This is the report that contains the statistics that we want to show in Sonar.

I've tried passing in the various paths but nothing seems to work in the Additional parameters section of the Sonar Scanner Bamboo Task

-Dsonar.javascript.lcov.reportPath=coverage/lcov.info

-Dsonar.javascript.lcov.reportPath=coverage

-Dsonar.javascript.lcov.reportPath=/coverage/lcov.info

We are running Atlassian Bamboo version 5.14.5 build 51419 and Sonar Version 5.6.5

 

 

1 answer

We think the issue is that the application is built with Typescript, not Javascript so it is not triggering the Javascript plugin and ignoring the coverage/lcov.info

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted yesterday in Featured Groups

Want to know how Atlassians monitor their enterprise deployments?

At Atlassian, we believe in our own products – that's why we use them, even at the enterprise level. Doing so gives us first-hand experience of how they perform at scale; to do this, we monitor each ...

65 views 0 7
View post

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you