Wrong projectKey and token is detected in bitbucket pipeline

Cannot analyze properly when having two projects in one bitbucket repo.

  • I have two projects in one bitbucket repo, Repo/UI and Repo/Backend. Repo is linked with SonarCloud project which works fine for back-end analysis.

  • For UI project (Angular) I have created new project in SonarCloud and added projectKey, Organization, login etc but in pipeline it always detects projectKey of linked SonarCloud Project.

P.S.: I have also observed this One repo, two projects, different languages and tried to solve in the same way. But when UI analysis is run it overrides the Back-end code analysis.

Hi @mazhar,

Welcome to our community forum!

It’s not a well supported use case, let’s see if we can find a workaround.

  • could you share your bitbucket-pipelines.yml of your UI project?
  • If it’s public could you share your Bitbucket repo and the links to your SonarCloud projects?

Thanks

I’m not sure what “solving it the same way” would mean. It sounds like you are trying to run multiple analysis, and hoping to see a combined result of the two runs. As the thread you linked explained, this is currently not possible. The only way to have analysis results of both projects, is to run a single analysis, configured to include all the code to analyze in both projects.