Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 [Sonar] Disabled Sonar Scan for PR/Branches from forks due to missing SONAR_TOKEN not available for forks #4180

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Coduz
Copy link
Contributor

@Coduz Coduz commented Jan 24, 2025

Brief description of the PR.
Disabled Sonar Scan for PR/branches that are from forks.
The SONAR_TOKEN is a secret of the main eclipse-kapua/kapua repo and for security reasons is not available for builds from forks.
Therefore is useless run the Sonar Scan for PR/branches in forks, since the sonar plugin is configured to run with orgname eclipse

The error occurring for all PR from forks is the following

Error:  Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:5.0.0.4389:sonar (default) on project kapua-assembly-job-engine: Error status returned by url [https://api.sonarcloud.io/analysis/jres?os=linux&arch=x86_64]: 401 -> [Help 1]
Error:  
Error:  To see the full stack trace of the errors, re-run Maven with the -e switch.
Error:  Re-run Maven using the -X switch to enable full debug logging.
Error:  
Error:  For more information about the errors and possible solutions, please read the following articles:
Error:  [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Error:  
Error:  After correcting the problems, you can resume the build with the command
Error:    mvn <args> -rf :kapua-assembly-job-engine
Error: Process completed with exit code 1.

Related Issue
None

Description of the solution adopted
Added a condition to the run of the Sonar Scan to match only the main eclipse-kapua/kapua repository

Screenshots
None

Any side note on the changes made
None

@Coduz Coduz added the Bug This is a bug or an unexpected behaviour. Fix it! label Jan 24, 2025
@Coduz Coduz force-pushed the fix-disableSonarScanForForks branch 2 times, most recently from 9202f76 to 166a68e Compare January 24, 2025 14:13
@Coduz Coduz force-pushed the fix-disableSonarScanForForks branch from 166a68e to 63d3bda Compare January 24, 2025 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a bug or an unexpected behaviour. Fix it!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant