Sonarqube quality gate not sending webhook to jenkins -


i configure jenkins work sonarqube scanner. scan working fine. jenkins pipeline working , don't have isssue in jenkins log.

sonarqube scanner 3.0.3.778 jenkins: 2.70 sonarqube scanner jenkins plugin: 2.6.1

i use code:

    stage('sonarqube analysis') {         sh 'sed -ie "s|_project_|${project_code}|g" $workspace/_pipeline/sonar-project.properties'         // requires sonarqube scanner 3.0+         def scannerhome = '/opt/sonar/bin/sonar-scanner';         withsonarqubeenv('mscodeanalysis') {             sh "${scannerhome}/bin/sonar-scanner -dproject.settings=$workspace/_pipeline/sonar-project.properties"         }     }     }     } }     }     // no need occupy node     stage("quality gate"){         timeout(time: 15, unit: 'minutes') { // in case goes wrong, pipeline killed after timeout         def qg = waitforqualitygate() // reuse taskid collected withsonarqubeenv             if (qg.status != 'ok') {                 error "pipeline aborted due quality gate failure: ${qg.status}"             }         }     } 

my problem come quality gate. never post json payload jenkins. don't see json entry inside jenkins log. know connection between jenkins , sonarqube server working because able send post using curl sonarqube vm.

here jenkins job output:

timeout set expire in 15 min [pipeline] { [pipeline] waitforqualitygate checking status of sonarqube task 'av3irvjxpvbxxxnjyzkd' on server 'mscodeanalysis' sonarqube task 'av3irvjxpvbxxxnjyzkd' status 'pending' cancelling nested steps due timeout 

here payload never reach jenkins pipeline: url: http://sonar-server:9000/api/ce/task?id=av3irvjxpvbxxxnjyzkd

{"task":{"organization":"default-organization","id":"av3irvjxpvbxxxnjyzkd","type":"report","componentid":"av3hrjecfl_nrf2072fh","componentkey":"pool-003","componentname":"pool-003","componentqualifier":"trk","analysisid":"av3irvkzszleb6psck9x","status":"success","submittedat":"2017-08-14t21:36:35+0000","submitterlogin":"jenkins","startedat":"2017-08-14t21:36:37+0000","executedat":"2017-08-14t21:36:38+0000","executiontimems":650,"logs":false,"hasscannercontext":true}} 

i can't insert image quality gate pass , analysis task success.

let me know if need include more information. thank you

adding sh 'sleep 10' between stage('sonarqube analysis') , stage("quality gate") fix issue. jenkins job receive

checking status of sonarqube task 'av3rhxhp3io6giaqf_oa' on server 'sonarserver' sonarqube task 'av3rhxhp3io6giaqf_oa' status 'success' sonarqube task 'av3rhxhp3io6giaqf_oa' completed. quality gate 'ok' 

Comments

Popular posts from this blog

PHP and MySQL WP -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

go - golang pprof for c library code -