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

Bug: Sonarqube Plugin in CI not working #6406

Open
2 tasks done
tanmaymohan opened this issue Feb 20, 2025 · 4 comments
Open
2 tasks done

Bug: Sonarqube Plugin in CI not working #6406

tanmaymohan opened this issue Feb 20, 2025 · 4 comments
Assignees
Labels
bug Something isn't working needs-triage Issue is not approved or ready-to-work on

Comments

@tanmaymohan
Copy link

📜 Description

While configuring the Sonarqube in pre-build stage , it fails to retrieve the sonar token variables and bugs out in the ci steps. The Sonarqube global token is already supplied in the input variables and project key is also present.

👟 Reproduction steps

Go to either of the plugin Sonarqube or Sonarqube 1.0.0 or v1.1.0.

Enter the project key , apikey , endpoint

Use properties file = choose any
Check for sonaranalyis = true
Abort on policy check = false
Container image = blank (default)

👍 Expected behavior

It should fetch the proper variables , run the sonarscanner and show the results in Sonarqube dashboard and complete the ci step.

👎 Actual Behavior

Fails with errors of missing variables whereas they are already present

☸ Kubernetes version

EKS Kubernetes 1.29 and Devtron v1.2.2

Cloud provider

AWS ap-south-1

🌍 Browser

Chrome

🧱 Your Environment

Tried running Sonarqube 9.9 LTS community and also 2025 latest both had same issue.
Sonarqube addition in helm in devtron stack manager also didn't work
Tried adding the option to run the scanner container manually in a custom CI task and mounted the code accordingly and it failed with permission denied error.

✅ Proposed Solution

To fix, there could be a change in SONAR_LOGIN which is getting deprecated and SONAR_TOKEN should be read from variables.

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find any similar issue

🏢 Have you read the Code of Conduct?

@tanmaymohan tanmaymohan added bug Something isn't working needs-triage Issue is not approved or ready-to-work on labels Feb 20, 2025
@satyampsoni
Copy link
Contributor

Hi @tanmaymohan, thanks for raising the bug. I attempted to replicate it and encountered the same issue. However, I'm not sure if changing to SONAR_TOKEN will resolve it. Tagging @abhibhaw for his thoughts on this.

@tanmaymohan
Copy link
Author

Another thing I tried with discord support from devtron was to run the ci in sleep() and then by directly running the commands from that container (somewhat like sshing to container). Only then it worked.

@abhibhaw
Copy link
Member

Hey @tanmaymohan can you please help me with the logs of your CI execution where sonarqube fails (please be sure to remove any sensitive details before sharing)

@tanmaymohan
Copy link
Author

Screenshot 2025-02-26 at 3.28.41 PM.png

Screenshot 2025-02-26 at 3.28.07 PM.png

Here's the config and the error during execution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage Issue is not approved or ready-to-work on
Projects
None yet
Development

No branches or pull requests

5 participants