Must-share information (formatted with Markdown):
- SonarQube Developer 8.9.6, Scanner 4.6
- Trying to achieve: Get a pull request analysis without using GitLab’s “Pipelines for Merge Requests” aka detached pipelines aka “only: merge_requests”.
- Tried so far: Given parameters: sonar.pullrequest.key, sonar.pullrequest.branch and sonar.pullrequest.base manually.
I’m trying to get a pull request analysis instead of a branch analysis. When using “only: merge_requests” in the .gitlab-ci.yml file, everything works as expected and the pull request appears in SonarQube under “Pull Requests”.
However, when I remove the “only: merge_requests” and give the three parameters sonar.pullrequest.key, sonar.pullrequest.branch and sonar.pullrequest.base, the analysis is started using a branch analysis.
I don’t want to use pipelines for merge requests (“only: merge_requests”), because it conflicts with other GitLab CI stages/processes. What hidden variables does “only: merge_requests” set so that the analysis is started as a pull request?