I have a Windows Web Site project written in ASP.NET (not Core) C# and I’m using BitBucket Cloud as my code repository. I have SonarQube Developer (ZIP) self-hosted on an Amazon AWS. I’m trying to get a BitBucket pipeline running and I’ve run into a few obstacles.
Google refers me to an Atlassian post from 2024 stating that “Bitbucket Pipelines’ cloud infrastructure only supports Linux-based Docker images,” and mine is a Windows-based image, “which do not support the older, Windows-specific .NET Framework (not Core). To build and run a classic .NET Framework application, you must use a self-hosted Windows runner.“
Is that reference accurate, and I need to set up a runner to run this pipeline? Would there be an issue setting up this runner on my SonarQube server? And do you have any references to documentation specific to this setup?
Yes, that reference is accurate, so that means you need to use a self-hosted Windows runner if you intend to build/scan your Windows Web Site project with non-Core ASP.NET.
No, not necessarily a problem to run/scan that Windows Web Site project on the same machine as your SonarQube Server. It will become problematic if you have a large load of reports processed by SonarQube and you want to scan your project on the same machine, because performance will depend on what you deem important. In general, I recommend running SonarQube separately from your build agents/runners.
We don’t have any official documentation on your project setup since it is not common, but the concept is straightforward:
Create a self-hosted Bitbucket Cloud runner on the Windows machine
Ensure the project can be built with Bitbucket Cloud
Install SonarQube on the same Windows machine (if you can’t get another Windows machine)
Update your Bitbucket Cloud pipeline to point to your SonarQube server