Bamboo build result doesn't display Sonar Analysis for some projects

Sonar for Bamboo used to work but when I set this up for a new project, the tasks ran successfully and I checked the analysis can be access in SonarQube, however, there is no link in the Bamboo result page to the Sonar Analysis page, any reason for this and how I can troubleshoot this?

build	04-Aug-2015 15:17:10	[INFO] [15:17:10.696] Store results in database
build	04-Aug-2015 15:17:14	[INFO] [15:17:14.743] ANALYSIS SUCCESSFUL, you can browse http://sonar:9000/dashboard/index/com.eclipseoptions.pnlsvc:pnlsvc:feature_PNL-1007-test-sonar-bamboo-integration
build	04-Aug-2015 15:17:14	[INFO] [15:17:14.782] Executing post-job class org.sonar.plugins.dbcleaner.ProjectPurgePostJob
build	04-Aug-2015 15:17:14	[INFO] [15:17:14.799] -> Keep one snapshot per day between 2015-07-07 and 2015-08-03
build	04-Aug-2015 15:17:14	[INFO] [15:17:14.801] -> Keep one snapshot per week between 2014-08-05 and 2015-07-07
build	04-Aug-2015 15:17:14	[INFO] [15:17:14.801] -> Keep one snapshot per month between 2010-08-10 and 2014-08-05
build	04-Aug-2015 15:17:14	[INFO] [15:17:14.802] -> Delete data prior to: 2010-08-10
build	04-Aug-2015 15:17:14	[INFO] [15:17:14.844] -> Clean pnlsvc feature_PNL-1007-test-sonar-bamboo-integration [id=47062]
build	04-Aug-2015 15:17:14	[INFO] [15:17:14.861] <- Clean snapshot 3503882
build	04-Aug-2015 15:17:16	[INFO] [15:17:16.956] -> Clean pnl-client feature_PNL-1007-test-sonar-bamboo-integration [id=47063]
build	04-Aug-2015 15:17:16	[INFO] [15:17:16.959] -> Clean pnl-data feature_PNL-1007-test-sonar-bamboo-integration [id=47064]
build	04-Aug-2015 15:17:16	[INFO] [15:17:16.965] -> Clean pnl-server feature_PNL-1007-test-sonar-bamboo-integration [id=47065]
build	04-Aug-2015 15:17:16	[INFO] [15:17:16.970] -> Clean pnl-mock feature_PNL-1007-test-sonar-bamboo-integration [id=47066]
build	04-Aug-2015 15:17:16	[INFO] [15:17:16.977] -> Clean pnl-tests feature_PNL-1007-test-sonar-bamboo-integration [id=47067]
build	04-Aug-2015 15:17:16	[INFO] [15:17:16.985] -> Clean pnl-common feature_PNL-1007-test-sonar-bamboo-integration [id=47068]
build	04-Aug-2015 15:17:16	[INFO] [15:17:16.990] -> Clean scenario-client feature_PNL-1007-test-sonar-bamboo-integration [id=47069]
build	04-Aug-2015 15:17:16	[INFO] [15:17:16.993] -> Clean scenario-data feature_PNL-1007-test-sonar-bamboo-integration [id=47070]
build	04-Aug-2015 15:17:16	[INFO] [15:17:16.996] -> Clean tradetick-data feature_PNL-1007-test-sonar-bamboo-integration [id=47071]
build	04-Aug-2015 15:17:17	[INFO] [15:17:16.999] -> Clean syntheticposition-data feature_PNL-1007-test-sonar-bamboo-integration [id=47072]
build	04-Aug-2015 15:17:17	[INFO] [15:17:17.008] -> Clean mkttrade-server feature_PNL-1007-test-sonar-bamboo-integration [id=47073]
build	04-Aug-2015 15:17:17	[INFO] [15:17:17.012] -> Clean mkttrade-tests feature_PNL-1007-test-sonar-bamboo-integration [id=47074]
build	04-Aug-2015 15:17:17	[INFO] [15:17:17.058] Executing post-job class org.sonar.plugins.core.issue.notification.SendIssueNotificationsPostJob
build	04-Aug-2015 15:17:17	[INFO] [15:17:17.083] Executing post-job class org.sonar.plugins.core.batch.IndexProjectPostJob
build	04-Aug-2015 15:17:17	[INFO] [15:17:17.572] Executing post-job class org.sonar.plugins.buildbreaker.AlertBreaker
build	04-Aug-2015 15:17:17	[INFO] [15:17:17.579] Executing post-job class org.sonar.plugins.buildbreaker.ForbiddenConfigurationBreaker
build	04-Aug-2015 15:17:17	[INFO] ------------------------------------------------------------------------
build	04-Aug-2015 15:17:17	[INFO] Reactor Summary:
build	04-Aug-2015 15:17:17	[INFO] 
build	04-Aug-2015 15:17:17	[INFO] pnlsvc ............................................ SUCCESS [1:37.684s]
build	04-Aug-2015 15:17:17	[INFO] syntheticposition-data ............................ SKIPPED
build	04-Aug-2015 15:17:17	[INFO] pnl-data .......................................... SKIPPED
build	04-Aug-2015 15:17:17	[INFO] pnl-client ........................................ SKIPPED
build	04-Aug-2015 15:17:17	[INFO] scenario-data ..................................... SKIPPED
build	04-Aug-2015 15:17:17	[INFO] tradetick-data .................................... SKIPPED
build	04-Aug-2015 15:17:17	[INFO] pnl-common ........................................ SKIPPED
build	04-Aug-2015 15:17:17	[INFO] pnl-server ........................................ SKIPPED
build	04-Aug-2015 15:17:17	[INFO] pnl-mock .......................................... SKIPPED
build	04-Aug-2015 15:17:17	[INFO] scenario-client ................................... SKIPPED
build	04-Aug-2015 15:17:17	[INFO] pnl-tests ......................................... SKIPPED
build	04-Aug-2015 15:17:17	[INFO] mkttrade-server ................................... SKIPPED
build	04-Aug-2015 15:17:17	[INFO] mkttrade-tests .................................... SKIPPED
build	04-Aug-2015 15:17:17	[INFO] ------------------------------------------------------------------------
build	04-Aug-2015 15:17:17	[INFO] BUILD SUCCESS
build	04-Aug-2015 15:17:17	[INFO] ------------------------------------------------------------------------
build	04-Aug-2015 15:17:17	[INFO] Total time: 1:43.909s
build	04-Aug-2015 15:17:17	[INFO] Finished at: Tue Aug 04 15:17:17 HKT 2015
build	04-Aug-2015 15:17:17	[INFO] Final Memory: 53M/809M
build	04-Aug-2015 15:17:17	[INFO] ------------------------------------------------------------------------
simple	04-Aug-2015 15:17:18	Finished task 'Display Sonar Result' with result: Success

3 answers

Hi,

Sonar for Bamboo parses the URL from the build output ("ANALYSIS SUCCESSFUL, you can browse <URL>") and adds this link to the Bamboo build results page. It only considers log lines that are part of the SonarQube build output. For this, it checks the line range starting with "INFO: SonarQube Server" until the end of the SonarQube build output.

Do you have a line starting with "INFO: SonarQube Server" somewhere in your build output?

Best regards,

Michael (plug-in author)

I do see these lines:

build	04-Aug-2015 16:05:01	INFO: SonarQube Server 4.5.4
...
ANALYSIS SUCCESSFUL, you can browse http://sonar:9000/dashboard/index/com.eclipseoptions.pnlsvc:pnlsvc
...
build	04-Aug-2015 16:06:18	INFO: SonarQube Server 4.5.4 
...
ANALYSIS SUCCESSFUL, you can browse http://sonar:9000/dashboard/index/com.eclipseoptions.pnlsvc:pnlsvc:feature_PNL-1009-test-sonar-bamboo-integration
in which these URLs are valid, I hope it's not because the url is too long?

Just verified that our parser is able to extract your SonarQube result URL. The problem was the prefix of the line "INFO: SonarQube Server" which was different than expected. Would you mind creating a bug report at https://mibexsoftware.atlassian.net/browse/SONARBOO ? I could then create a snapshot release and attach it to the issue and you could try it out if this really fixes this problem. Thanks

Hi Michael,

we have the same problem. We had a phase where these links were displayed correctly, but the are not displayed anymore.

This is how our logs look like:

build	05-Jan-2016 10:53:09	[INFO] [10:53:09.589] Execute decorators...
build	05-Jan-2016 10:53:11	[INFO] [10:53:11.067] Store results in database
build	05-Jan-2016 10:53:11	[INFO] [10:53:11.751] Analysis reports generated in 28ms, dir size=6 KB
build	05-Jan-2016 10:53:11	[INFO] [10:53:11.777] Analysis reports compressed in 26ms, zip size=14 KB
build	05-Jan-2016 10:53:12	[INFO] [10:53:12.003] Analysis reports sent to server in 226ms
build	05-Jan-2016 10:53:12	[INFO] [10:53:12.003] ANALYSIS SUCCESSFUL, you can browse https://sonar.wob.vw.vwg:8443/sonar/dashboard/index/de.volkswagen.jtps:jira-to-planenbm-synchronizer:master

We also upgraded the plugin to 1.2.5 but it did not help.

Do you have any suggestions why the link is not displayed anymore?

Regards,
Daniel

Hi Daniel, Which version of SonarQube are you using? We will soon release a new version of the plug-in which will contain improvements in the way the link to SonarQube is created out of the build results. If you like, you can create a bug report at https://mibexsoftware.atlassian.net/browse/SONARBOO and I will give you a snapshot earlier by attaching it to the JIRA issue. That would help to make sure that the link issue got really fixed for you as well.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Jul 10, 2018 in Marketplace Apps

If you’re an Atlassian app developer, you’ll want to know about Atlas Camp!

This September 6-7, hundreds of Atlassian App developers will flock to Barcelona Spain to build skills, discover product roadmaps, meet face-to-face with the Atlassian team, and learn how to extend t...

182 views 0 4
Read article

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