My SonarQube installation runs Developer Edition (currently for the setup still without any licence), V9.9.4 and is currently in evaluation mode with an embedded DB. Like in this thread, I’m trying to import Bitbucket v7.21.22 repositories as Sonar projects, but unlike there, I’m only seeing 6 of the 10 existing BB projects in Sonar.
The BB user whose token Sonar uses can definitely see all projects in BB though.
The integration setup is checked and valid.
I have tested the integration with both a purely Read token and with a full Admin one (as it can be seen at the access timestamps), with exactly the same results both time.
So I took the commands recommended there, replaced the placeholders and ran them, with the following results when searching for one of the repositories in one of the missing projects:
curl -XGET -u "<SQ_TOKEN>:" "<SQ_URL>/api/alm_integrations/search_bitbucketserver_repos?almSetting=<YOUR_ALM_SETTINGS_NAME>&repositoryName=<YOUR_REPOSITORY_NAME>"
response:
{"isLastPage":true,"repositories":[]}
curl -XGET -u "<USER_NAME>:<TOKEN>" "<BITBUCKET_URL>/rest/api/1.0/repos?projectname=&name=<YOUR_REPOSITORY_NAME>"
response:
{"size":1,"limit":25,"isLastPage":true,"values":[{"slug":"<YOUR_REPOSITORY_NAME>","id":1375,"name":"<YOUR_REPOSITORY_NAME>","description":"<REDACTED_REPO_DESCRIPTION>","hierarchyId":"<REDACTED>","scmId":"git","state":"AVAILABLE","statusMessage":"Available","forkable":true,"project":{"key":"<REDACTED_PROJECT_KEY>","id":1248,"name":"<REDACTED_PROJECT_NAME>","public":false,"type":"NORMAL","links":{"self":[{"href":"https://<BB_URL>/projects/<REDACTED_PROJECT_KEY>"}]}},"public":false,"links":{"clone":[{"href":"https://<BB_URL>/scm/<REDACTED_PROJECT_KEY>/<YOUR_REPOSITORY_NAME>.git","name":"http"},{"href":"ssh://git@<BB_URL_WITHOUT_PORT>:7999/<REDACTED_PROJECT_KEY>/<YOUR_REPOSITORY_NAME>.git","name":"ssh"}],"self":[{"href":"https://<BB_URL>/projects/<REDACTED_PROJECT_KEY>/repos/<YOUR_REPOSITORY_NAME>/browse"}]}}],"start":0}
Apparently Sonar really can’t see the affected project.
Does this help? Or should I try something else?
Thanks!