Reputation: 1184
I have added sonarkube in my CI by Azure Devops, there is a job called prepare analysis on SonarQube in my CI and in this job I have created a service connection, in this popup window, SonarQube server URL muss be added, In my Azure Portal I can only finde "abcsonarqube.westeurope.azurecontainer.io" in container instance. In a website I have seen, that the SonarQube server URL is based on "cloudapp.azure.con:9000", so I have added this url "abcsonarqube.westeurope.cloudapp.azure.con:9000".
but by deployment I got this error:
##[error][SQ] API GET '/api/server/version' failed, error was: {"code":"ENOTFOUND","errno":"ENOTFOUND","syscall":"getaddrinfo","hostname":"abcsonarqube.westeurope.cloudapp.azure.com","host":"abcsonarqube.westeurope.cloudapp.azure.com","port":"9000"}
Does somebody have any solutions?
Upvotes: 4
Views: 6524
Reputation: 30372
How finde the SonarQube server URL in Azure Portal
According to your description, seems you installed the SonarQube Server on an Azure VM. If so, you just need to provide the DNS name
suffixed by the port number.
Copy the DNS name
from the created Virtual Machine in Azure Portal as shown and append :9000 at the end. The final SonarQube URL will be http://YOUR_DNS_NAME:9000
.
So, your SonarQube Server URL seems right, however not sure if it's a typo in your original post : "abcsonarqube.westeurope.cloudapp.azure.con:9000
" the last .con
should be .com
If the URL is correct, then the problem should be caused by the connectivity, please make sure the agent can access the SonarQube Server.
Upvotes: 1
Reputation: 16018
Maybe it requires a full path with http://
according to this article: Exercise 2: Modify the Build to Integrate with SonarQube. Or azure devops service can not find your SQ server. You can find the SQ url in the Project Setting under Service Connections:
Upvotes: 1