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

Eclipse Trading August 3, 2015

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

4 answers

0 votes
TJ_Kolev October 5, 2018

Greetings,

We are experiencing the same problem. Fairly new installation of Bamboo (version 6.6.1 build 60605 - 04 Jul 18) and Sonar plugin (2.0.3) using the MSBuild task. Looks like analysis is complete, but there's nothing visible added to the build result page.

Some log entries with line numbers

54460 build 04-Oct-2018 16:30:40 INFO: SonarQube Scanner 3.2.0.1227
54461 build 04-Oct-2018 16:30:40 INFO: Java 1.8.0_181 Oracle Corporation (64-bit)
54462 build 04-Oct-2018 16:30:40 INFO: Windows Server 2012 R2 6.3 amd64
54463 build 04-Oct-2018 16:30:40 INFO: SONAR_SCANNER_OPTS=-Xmx1024m
54464 ...
54465 build 04-Oct-2018 16:30:42 INFO: SonarQube server 6.1
...
57537 build 04-Oct-2018 17:23:32 INFO: ANALYSIS SUCCESSFUL, you can browse http://{Valid url that works}

 The logged URL works fine.

We also have the Sonar add on in BitBucket, and that also does not show any visible hint of being there. Perhaps it is related to the Bamboo issue.

Help resolving this problem would be much appreciated.

Thank you.

Michael Rüegg _Mibex Software_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 17, 2019

Hi,

Please excuse my very late response.

We are not aware of any issues with showing the analysis result link on the build results page for the MSBuild task.

To be able to reproduce this issue, it would help us a lot if you could create a support ticket at https://support.mibexsoftware.com together with the Bamboo server logs with debug logging for the app enabled (please see here for more information: https://mibexsoftware.atlassian.net/wiki/spaces/MSS/pages/764215385/How+to+enable+debug+logging+for+Bamboo+apps).

Thanks in advance,

Michael (app vendor)

TJ_Kolev January 18, 2019

Thanks for your reply, Michael!

I did open a ticket: https://mibexsoftware.atlassian.net/servicedesk/customer/portal/1/MIBEX-1162

It hit a an ice wall and froze...

0 votes
Daniel Drachau January 4, 2016

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

Mibex_Software
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 5, 2016

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.

0 votes
Eclipse Trading August 3, 2015

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?
Mibex_Software
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 3, 2015

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

0 votes
Mibex_Software
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 3, 2015

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)

M Walton January 12, 2023

Was this issue ever resolved?

In our case, the log output is like the following:
"INFO: ANALYSIS SUCCESSFUL, you can find the results at: <URL>

Michael Rüegg _Mibex Software_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 12, 2023

@M WaltonThanks for asking. We are not aware of any issues with showing the analysis result link on the build result page.

Could you please create a support request, so that we can look into this?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events