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

Change how Sonar is invoked for GHAs #168

Merged
merged 2 commits into from Dec 15, 2021
Merged

Change how Sonar is invoked for GHAs #168

merged 2 commits into from Dec 15, 2021

Conversation

smcvb
Copy link
Member

@smcvb smcvb commented Dec 15, 2021

This pull request adjusts both the main and the pullrequest workflows on how to deal with Sonar.
Firstly, Sonar analysis is moved to a separate stage instead of being a part of the regular build.

Secondly, for pull requests, Sonar analysis should only be ran for non-forked pull requests.
This is required as SonarCloud doesn't provide a preview approach and thus needs Sonar's secrets; secrets that we don't want to share with non-team members.

Change both the main and PR GHAs to deal differently with Sonar. Sonar
can be run separately for main. For PR's Sonar should only run if the PR
comes from a non-forked branch. Furthermore, by separating the build
from sonar, we ensure the build is still done at all times

#enhancement/gha-sonar
Add missing GitHub token

#168
@sonarcloud
Copy link

sonarcloud bot commented Dec 15, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link
Contributor

@lfgcampos lfgcampos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@smcvb smcvb merged commit 0ccea80 into master Dec 15, 2021
@smcvb smcvb deleted the enhancement/gha-sonar branch December 15, 2021 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants