SonarCloud Integration with .Net core project
Hi Team,
I am working on integrating sonarcloud scan to trigger with every PR request raise. I am checking on the documentation but could you please let me know how I can integrate this in appveyor.yaml file.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Owen McDonnell on 27 Sep, 2024 09:11 PM
I'm not sure if you're asking how to install sonarscanner from the command line or how to only do so on PR events.
Regarding the latter question you can use "tweak variables" to determine if the build is triggered by a PR (i.e. check if
APPVEYOR_PULL_REQUEST_NUMBER
variable exists), and if so download and run sonarscanner.Does that help?
2 Posted by Dinesh Prajapat... on 28 Sep, 2024 11:35 AM
Restricted
Hi Owen,
It did not help the way it is needed. I want it to be set as another build in the bitbucket repository and only if both the builds passed successfully then only it should be allowed to merge into master.
Below is the screenshot for snyk integration, in the same fashion I want to replace snyk with sonarcloud scan.
[cid:[email blocked]]
Regards,
Dinesh Prajapati
From: Owen McDonnell <[email blocked]>
Sent: 27 September 2024 22:11
To: Dinesh Prajapati <[email blocked]>
Subject: Re: SonarCloud Integration with .Net core project [Problems #37201]
CAUTION: This message originates from outside our organisation and may contain suspicious content. Please take care when clicking links or opening attachments, especially from unknown senders! If in doubt, please contact [email blocked]<mailto:[email blocked]>.
3 Posted by Dinesh Prajapat... on 28 Sep, 2024 05:29 PM
Restricted
Also Owen I have the sonarcloud.sh setup script at my root level. I just want the script to be called whenever a PR is raised in bitbucket and only if the main build (code one) and then the sonarcloud scan is successful, PR should be allowed to merge.
From: Dinesh Prajapati <[email blocked]>
Sent: 28 September 2024 12:36
To: Owen McDonnell <[email blocked]>
Subject: RE: SonarCloud Integration with .Net core project [Problems #37201]
Hi Owen,
It did not help the way it is needed. I want it to be set as another build in the bitbucket repository and only if both the builds passed successfully then only it should be allowed to merge into master.
Below is the screenshot for snyk integration, in the same fashion I want to replace snyk with sonarcloud scan.
[cid:[email blocked]]
Regards,
Dinesh Prajapati
From: Owen McDonnell <[email blocked]<mailto:[email blocked]>>
Sent: 27 September 2024 22:11
To: Dinesh Prajapati <[email blocked]<mailto:[email blocked]>>
Subject: Re: SonarCloud Integration with .Net core project [Problems #37201]
CAUTION: This message originates from outside our organisation and may contain suspicious content. Please take care when clicking links or opening attachments, especially from unknown senders! If in doubt, please contact [email blocked]<mailto:[email blocked]>.
Support Staff 4 Posted by Owen McDonnell on 01 Oct, 2024 05:06 PM
I'm not 100% clear on the intention here, but before trying to clarify can you make sure to read the section of the docs on build matrix. It sounds like you need to employ some feature/dimension of that to achieve what you want