We are switching from SonarQube to SonarCloud and I’m working on getting our Azure DevOps pipelines working. My current challenge is getting the SonarCloudPublish
working:
- task: SonarCloudPublish@1
displayName: 'SonarCloud publish'
inputs:
pollingTimeoutSec: '300'
The error that occurs:
##[error][SQ] Could not fetch metrics
##[error][SQ] API GET '/api/metrics/search' failed, error was: {"errno":"ETIMEDOUT","code":"ETIMEDOUT","syscall":"connect","address":"52.28.41.88","port":443}
##[error][SQ] API GET '/api/server/version' failed, error was: {"errno":"ETIMEDOUT","code":"ETIMEDOUT","syscall":"connect","address":"52.28.41.88","port":443}
I have already setup the proxy in the job’s variables section, which fixed the SonarCloudAnalyze
task.
variables:
SONAR_SCANNER_OPTS: -Dhttps.proxyHost=192.168.16.90 -Dhttps.proxyPort=80
Any help would be appreciated.
Edit:
When providing the proxy as HTTP_PROXY in the variables, an ECONNRESET error is returned.
variables:
SONAR_SCANNER_OPTS: -Dhttps.proxyHost=192.168.16.90 -Dhttps.proxyPort=80
HTTPS_PROXY: https://192.168.16.90:80
HTTP_PROXY: http://192.168.16.90:80
##[error][SQ] Could not fetch metrics
##[error][SQ] API GET '/api/metrics/search' failed, error was: {"code":"ECONNRESET"}
##[error][SQ] API GET '/api/server/version' failed, error was: {"code":"ECONNRESET"}