Using Bitbucket cloud, I am trying to make a pipeline to scan new code on a pull request.
I have a self-hosted runner configured on a windows server.
According to SonarCloud instructions for Bitbucket pipelines, I added the following to my bitbucket-pipelines.yml:
- pipe: sonarsource/sonarcloud-scan:1.4.0
- pipe: sonarsource/sonarcloud-quality-gate:0.1.6
When the pipeline runs, it immediately fails with a configuration error “The Pipes feature is not supported on this self-hosted runner’s platform”.
Indeed, Pipes are not supported by bitbucket’s self-hosted windows runners as stated in the documentation.
Is there a workaround for that? If so, shouldn’t it be suggested along with the instructions to configure bitbucket pipelines for sonarcloud, as it must be a pretty common case?
Indeed, our tutorials have not caught up with windows-based runners. I’ll flag that for attention.
And, you should be able to accomplish analysis via a
script block which downloads and executes the relevant scanner. What language(s) is/are the code you’re analyzing?
Hi Colin, thanks for responding.
The code is in php.
I’ve been trying to use sonarscanner directly from the
script block as you mention, I think I’m close to achieving the result I want. I used the
sonarsource/sonar-scanner-cli docker image instead of downloading the scanner based on this doc, and this one to adapt it to sonarcloud.
It’s just too bad that the tutorial using pipes is so neat and seems to take barely a few minutes to set up, while I struggled for hours reading various documentations and forums to end up with this solution