Something else?
An option must be added to be able to enter the sonar url and the token by variables. These variables are automatically generated at runtime.
What’s your specific coding challenge in developing your plugin?
Being able to support small businesses that do not have a sonar server
And, if relevant, please share the code that’s giving you problems:
An option should be added to be able to select between “connectedService:sonarqube” or url + token.
I have been working with .net (c#) for over 20 years. Typescript is not my strong point. Is there a possibility to add this new option to add a server at runtime?
the code is:
{
"name": "SonarQubeServerConnectionType",
"type": "pickList",
"label": "SonarQube Server connection type",
"required": true,
"helpMarkDown": "Select the type of SonarQube Server connection type.",
"options": {
"serverendpoint": "SonarQube Server endpoint",
"urltoken": "Url + Token"
},
"defaultValue": "serverendpoint"
},
{
"name": "SonarQube",
"type": "connectedService:sonarqube",
"label": "SonarQube Server Endpoint",
"required": true,
"helpMarkDown": "Select the SonarQube server endpoint for your project. To create one, click the Manage link and create a new SonarQube Server Endpoint, enter your server url and token.",
"visibleRule": "SonarQubeServerConnectionType = serverendpoint"
},
{
"defaultValue": "$(SonarQubeServerUrl)",
"helpMarkDown": "Specify the SonarQube server url",
"label": "Sonar Qube Server url",
"name": "SonarQubeServerUrl",
"required": true,
"type": "string",
"visibleRule": "SonarQubeServerConnectionType = urltoken"
},
{
"defaultValue": "$(SonarQubeServerToken)",
"helpMarkDown": "Specify the SonarQube server token",
"label": "Sonar Qube Server token",
"name": "SonarQubeServerToken",
"required": true,
"type": "string",
"visibleRule": "SonarQubeServerConnectionType = urltoken"
}
I also want to know how open the community is so that this modification can be made. This is the most important thing!
The final idea is to be able to run a sonar scan without having sonarqube installed. For this I am going to develop an azure devops extension that will do the following:
start sonar in docker, generate an apitoken and expose it as an output variable. With this token the normal scan is done. As a final step, the sonarqube database will be saved in the azurepipeline artifact so that in the next execution we already have the baseline and all the previous scans.
Also with the help of extensions a report can be generated and this can be uploaded with the Azude Devops extension: Upload Report To Azure Devops Wiki - Visual Studio Marketplace to the project wiki. In this way, by not having a sonar server, the reports can be consulted as they evolved in the different executions.
Of course, you’re welcome to develop your own extension to do whatever you like, but we’re not interested in integrating this into our official extension.
For users who don’t want to install SonarQube Server, SonarQube Cloud is an attractive alternative that doesn’t require users to set up any special infrastructure.