I had initially an issue to scan my repo with SonarCloud.io i am using sonar-scanner.4.2 i was unable to connect to SonarCloud.io due to a proxy issues but i fixed it in adding SONAR_SCANNER_OPTS='-Dhttps.proxyHost=****** -Dhttps.proxyPort=****' in environement section in my jenkins file.
environment {
SONAR_SCANNER_OPTS='-Dhttps.proxyHost=****** -Dhttps.proxyPort=****'
}
stage('SonarCloud analysis') {
withSonarQubeEnv('My SonarQube Cloud') {
sh 'mvn clean package sonar:sonar'
}
}
}
stage("Quality Gate"){
timeout(time: 1, unit: 'HOURS') {
def qg = waitForQualityGate()
if (qg.status != 'OK') {
error "Pipeline aborted due to quality gate failure: ${qg.status}"
}
}
}
Now i have the same issue but with the function waitForQualityGate() return error
Below find the error:
java.net.SocketException: Connection reset Caused: java.lang.IllegalStateException: Fail to request https://sonarcloud.io/api/ce/task?id=********
How do i to set the proxy with the function or maybe this is another issue.