Unable to access sonarqube webhook

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}"
    }
  }
  )
}
}
}

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

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?

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

Yes i did and getting 404 page not found error. this is how webhook configured jekinshost:port/sonarqube-webhook/

Hi,

Do you have the SonarQube plugin installed in Jenkins?

 
Ann