gkarthiraja
(Karthiraja Gopalsamy)
December 4, 2020, 1:12pm
1
Unable to access sonar webhook also getting 404 in webhook response. Please help to create pipeline for codequality and quality gate
stage('SonarQube analysis') {
steps {
withSonarQubeEnv('SonarQube Server') {
sh '''
cd new-viz-services
mvn clean package sonar:sonar
'''
}
} // SonarQube taskId is automatically attached to the pipeline context
}
stage("Quality Gate"){
steps{
sleep time: 3000, unit: 'MILLISECONDS'
timeout(time: 1, unit: 'MINUTES') {
step (
def qg = waitForQualityGate()
script{
if((qg.status) != 'OK'){
error "Pipeline aborted due to quality gate failure: ${qg.status}"
}
}
)
}
}
}
ganncamp
(G Ann Campbell)
December 4, 2020, 4:47pm
2
Hi,
Welcome to the community!
When you say you’re getting a 404 in the webhook response, you mean that the webhook is sent and the server it was sent to returns a 404?
If that’s the case, then I think verifying the address you’re sending the webhook to is the best starting place.
HTH,
Ann
gkarthiraja
(Karthiraja Gopalsamy)
December 4, 2020, 5:42pm
3
Hi Ann,
Is there any specific step to validate the webhook response I have already added webhook with /sonarqube-webhook/ . What kind of response will be published in the browser If access the webhook URL address in browser?
ganncamp
(G Ann Campbell)
December 4, 2020, 6:00pm
4
Hi,
The first step would be to try in a browser the URL you’ve configured for the webhook. Do you still get a 404 when you do that?
Ann
gkarthiraja
(Karthiraja Gopalsamy)
December 4, 2020, 8:32pm
5
Yes i did and getting 404 page not found error. this is how webhook configured jekinshost:port/sonarqube-webhook/
ganncamp
(G Ann Campbell)
December 7, 2020, 6:27pm
6
Hi,
Do you have the SonarQube plugin installed in Jenkins?
Ann