I am trying out SQ Enterprise 8.2, auto-configuration of projects doesn’t work, and the documentation seems vague to me, so I need help.
In SQ Enterprise 7.9, my instance already had an ALM configuration for Bitbucket in the Administrator Settings, and that has been taken over nicely. The token has write permissions, and it is for a normal (non-admin) user. Pull request decoration worked before, even though it’s not for an admin user.
In my test for SQ 8.2, I’ve created a repository in Bitbucket, but found no project automatically created for it in SonarQube. Logs showed nothing. I also tried creating a Bitbucket project, then a repository inside it, still the same, no log messages. After executing an analysis (for a regular build, not for a PR), the project is created in SQ for that repository, but the Pull Request Decoration configuration for that project is still empty.
So I cannot confirm like this, that Pull Request Decoration is automatically configured for new projects. I have not executed a PR build yet, I don’t think I should. Correct me if I’m wrong. What am I missing here? Why can’t I see auto-configuration working? What can I do to fix it?
Previously, for whatever project I needed to analyze, I could just pass properties
sonar.pullrequest.bitbucketserver.repository to the scanner. Are these properties ignored now? Because after a pull request build, I get a warning in the SQ UI: “Pull request decoration did not happen. Please configure pull request properties in the project administration.”
And the documentation made me ask several other questions:
- Do I really need an admin user? In 7.9 a regular user worked fine. What difference does it make if I use an admin user?
- Why is it mentioned that a non-admin user with a read access token is enough for auto-configuration, if an admin user with a write access token is used for pull request decoration? I mean, who would configure both tokens anyway? Or do I really need 2 tokens? Feels too complicated the way it is currently documented.
- How can I verify that there is no error with my setup? Where are the logs?
- " f you create a project From a Bitbucket Server repository , SonarQube automatically configures your project settings for Pull Request decoration." <-- Are you confusing a repository with a project? Do I really need to create a new project for this, or is it enough if I create a new repository in an existing project? And where to create this project? In SQ or in Bitbucket? If in SQ, how?
And most importantly: now just by upgrading to SQ 8.2, none of my new and existing projects are auto-configured, and my old ways don’t work. This is really a frustrating experience, and a problem that I have to configure hundreds of already existing projects manually! What can I really do? Am I supposed to write a script that configures pull request decoration for each project, with an API call?
Thanks in advance.