-
Notifications
You must be signed in to change notification settings - Fork 27
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
chore: add ci analysis for sonar #337
chore: add ci analysis for sonar #337
Conversation
Can someone with sonar cloud access rights disable the automatic analysis on sonar so the cli integration can be fully tested if this PR looks good and we would like to merge it? Currently the pipeline is failing because of conflicts between automatic analysis and ci analysis. |
pom.xml
Outdated
|
||
<!-- build --> | ||
<maven.compiler.version>3.8.1</maven.compiler.version> | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the second empty line, one empty line should be enough.
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Hi @bmunguli @tuncaytunc-zf , |
@tunacicek thanks for reviewing this, as mentioned in my previous comment the pipeline is currently failing because of conflicts between automatic analysis and ci analysis analysis enabled in sonarcloud. I need someone with access rights in tractus-x sonarcloud project https://sonarcloud.io/project/overview?id=eclipse-tractusx_sldt-digital-twin-registry to disable the configured automatic analysis so the ci analysis could work. From the logs:
|
@bmunguli : Thanks for your feedback. |
@bmunguli : Could you please update the dependencies file? See also trg-7-04 You can run the Eclipse Dash License Tool: |
@tunacicek running the dash tool via maven plugin locally updates the DEPENDENCIES file with some libraries i have not introduced as part of this PR. The two new plugins that are introduced: Should I skip including those changes as part of this PR? |
@bmunguli : yes, you can skip those changes. thank you |
@tunacicek i disabled the automated analysis |
@Siegfriedk :Thank you :) |
- passing project key in pom.xml seems to cause
@tunacicek can you please check if the SONAR_TOKEN is set as a secret on this repository or organisation level? |
@bmunguli i have no permission to check it. @bmunguli : A reference implementation can be found here: |
@tunacicek only EF can check it. For adhoc, you can ask frederric gurr per matrix and hope he doesn't bite you :) |
@Siegfriedk thanks, I will try it :) |
Neither a repo-level (for |
1:1 communication does not scale. So please rather mention me in a comment here or create a HelpDesk issue. |
@fredg02 : thanks for your feedback. I would create a ticket to have a token. |
@bmunguli : I created the ticket |
@bmunguli ticket is closed. SONAR_TOKEN is available now. I rerun the build |
.github/workflows/build-snapshot.yml
Outdated
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
run: mvn -B --batch-mode sonar:sonar -Dsonar.projectKey=eclipse-tractusx_sldt-digital-twin-registry |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the -Dsonar.organization=eclipse-tractusx
parameter is missing here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The organization its defined in pom.xml , will add in workflow too and see
@tunacicek from the logs its complaining that: Double Checking the projectKey and organization look correct to me and matching with the project in sonar. |
Hi @pstankie, Could you check it please? |
I added SONAR_ORGANIZATION and SONAR_PROJECT_KEY github variables to repository settings. You can use them:
|
@pstankie :Thank you very much for your support. |
@tunacicek i tried the same configuration with a private sonar cloud instance and the integration works fine. |
I updated SONAR_TOKEN. Can you try again ? |
- it seems accessing the values from variables does not work
So the SONAR_TOKEN is not visible in PR from forked repository. You may try |
@pstankie thank you for your feedback here, will check the triggers |
@tunacicek as @pstankie commented previously github does not allow access to secrets on forked PRs so the sonar analysis can not happen there. I asked the question on the community. Seems there are few options recommended:
I am not super confident about the setup of the first two, shall we go ahead and use same approach as traceability-foss for now (the drawback with this is that we can not get feedback if the integration works until changes got to main)? |
Hi @bmunguli , |
- sonar can not run on prs from forks
@tunacicek merged main into the branch and added the soanar changes on a dedicate workflow same as tarceability repo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
Pre-review checks
Please ensure to do as many of the following checks as possible, before asking for committer review: