New NodeJS based sonarqube vsts task does not support proxy?

vsts

(Gareth Emslie) #1

Hi
We are currently using Sonarqube 7.2.1 and VSTS task 3.x which is based on PowerShell this works fine with our proxy settings. We want to upgrade to the VSTS task 4.x which is NodeJS based but we are seeing the following error:

[SQ] API GET ‘/api/server/version’ failed, status code was: 502 (Bad Gateway)

This occurs when the task attempts to connect to sonarqube server during build.

To reproduce you would need to setup an HTTP Proxy and a Private VSTS/TFS agent and follow the following steps to configure the agent to use your proxy

Currently the only workaround we know of is rolling back to the PowerShell based task which works fine with the proxy.

I had a quick look at the NodeJS implementation and I think we are missing one crucial part which is to query the proxy details before making any http calls as documented here:

Regards
Gareth