-
Notifications
You must be signed in to change notification settings - Fork 81
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
Sonarqube integration #2938
Sonarqube integration #2938
Conversation
@pazone our buildkite build seems to be failing due to If by any chance that rings a bell on your end. |
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
c779335
to
5dc099f
Compare
@jlind23 Do I understand correctly that now we don't need the I'd delete the Github Action workflow and the Jenkins step |
SonarQube Quality Gate |
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, just one doubt about when this new step needs to run
- label: ":sonarqube: Continuous Code Inspection" | ||
env: | ||
VAULT_SONAR_TOKEN_PATH: "kv/ci-shared/platform-ingest/elastic/fleet-server/sonar-analyze-token" | ||
agents: | ||
image: "docker.elastic.co/cloud-ci/sonarqube/buildkite-scanner:latest" | ||
command: | ||
- "buildkite-agent artifact download build/coverage.out ." | ||
- "/scan-source-code.sh" | ||
depends_on: | ||
- "unit-test" |
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.
Should this be running in all branches and PRs or just PRs?
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.
All branches. We also need to analyse main
What is the problem this PR solves?
Enables sonarqube code scanning and coverage reports.
Sonar project for fleet-server is already created.
This configuration provides:
Pull request analysis: Analyses newly added code for a particular pull request
SonarQube automatically adds a comment with digest information. If no java files were changed in a pull request we will see “No coverage/duplication information” labels
Branch analysis: Runs on branches like main and analyzes the entire codebase. Associates received code coverage with the branch
Sonarqube Requires a quality profile
Quality profile is configured on the sonarqube side.
Questions to the team:
Checklist
./changelog/fragments
using the changelog toolRelated issues
-->