Sonar for Stash project cleanup not working

In Stash settings > Sonar for Stash, I have checked "Sonar project cleanup" as enabled. However, when i go into the branch tab and deleted a branch, the Sonar analysis is not removed from SonarQube, I wonder if there are other things I need to set in order for the analysis to be removed?

sonar4stash-settings.png

Branches in Stash are already deleted:

sonar4stash-branches.png

In SonarQube, these analysis still exist:

sonar4stash-analysis.png

1 answer

Hi,

Destroying a project in SonarQube requires administer system permission. Does the user you have configured in Sonar for Stash have the necessary rights to do so?

If yes, do you see some errors in your Stash log (all the log entries of the plug-in start with "SONAR:")?

Best regards,

Michael

Hi Michael,

I am having the same issue. It used to work initially but has since stopped. I am connecting to sonarqube as the admin user so it has the requisite permissions to delete a project. What exactly should I be looking for in the stash logs? What command does it execute when trying to delete the sonar project?

Also, after a PR gets merged and the branch gets deleted, the sonar stats don't show up anymore on the PR, yet it persists in sonarqube.

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 May 30, 2018 in Marketplace Apps

Three tips for boosting your board's efficiency with Story Maps

Trello is one of the most effective tools for driving your sprints. It's customizable for every Agile team and product owners and Scrum masters (SM) love it. However, Agile teams often struggle with:...

849 views 2 9
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