circleci sonarQube scan currently fails for forked PR builds
See original GitHub issueDescribe the bug
PRs from forks will fail with [ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746:sonar (default-cli) on project server: Parameter 'sonar.pullrequest.branch' is mandatory for a pull request analysis
.
Needs to be fixed.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Troubleshooting pull requests from fork of private repository ...
Pull requests from forks of your private repository are failing at the checkout step with an error message as shown below.
Read more >Error: Parameter 'sonar.pullrequest.branch' is mandatory for a ...
I created a basic test project on SonarCloud with Circle CI. Following the tutorial on the documentation, it worked perfectly, both on scanning...
Read more >Merge request pipelines - GitLab Docs
The merge request pipeline fails. When using the merge when pipeline succeeds feature and both pipelines types are present, the merge request pipelines...
Read more >Not authorized to execute any SonarQube analysis when ...
First, I raise your attention on one important point: you should not run a "standard" SonarQube analysis on PR - otherwise your project...
Read more >Add specific pipelines configuration for Pull Request events
Currently no pipeline is being triggered which would allow automated comments on the pull request (SonarQube or any other smart tool/ bot). If...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi Jonas! Unfortunately we currently just work around it with https://github.com/corona-warn-app/cwa-server/pull/236. This way we don’t block any PRs, but sonar still doesn’t run on community PRs atm.
A workaround for this could be a chat-ops-like workflow. The following would be needed:
/sonar
) is posted on a fork pr push the changes from the fork to a dedicated branch on the upstream repositoryThis would require a PAT of a personal or technical user in repository secrets with repo write permissions as the default
secrets.GITHUB_TOKEN
is not sufficient.Would this be a way to go?