mibexsoftware / sonar-bitbucket-plugin

SonarQube plug-in to create pull request comments for found issues in Bitbucket Cloud
Other
123 stars 72 forks source link

Plugin not work with Jenkins(Sonar Plug-in for Bitbucket Cloud' skipped because one of the required properties is missing) #97

Closed Soyn closed 5 years ago

Soyn commented 5 years ago

Expected Behavior

After I install the plugin on my sonarQube server. I do the config in my jenkins pipeline, but it does not work. After the sonarQube analysis, the plugin should write comments on my bitbucket. But it did not.

Actual Behavior

This is my config: sh "${sonarqubeScannerHome}/bin/sonar-scanner -e -X \ -Dsonar.analysis.mode=issues \ -Dsonar.verbose=true \ -Dsonar.bitbucket.repoSlug=test-sonarqube \ -Dsoanr.bitbucket.accountName=myName \ -Dsonar.bitbucket.oauthClientKey=myoauthKey \ -Dsonar.bitbucket.oauthClientSecret=myOAuthSecret \ -Dsonar.bitbucket.branchName=${env.BANCH_NAME} \ -Dsonar.bitbucket.pullRequestId=2 \ -Dsonar.host.url=mySonrQubeServerURL \ -Dsonar.login=admin \ -Dsonar.password=admin \ -Dsonar.bitbucket.minSeverity=INFO \ -Dsonar.bitbucket.approvalFeatureEnabled=false \ -Dsonar.bitbucket.buildStatusEnabled=false \ -Dsonar.bitbucket.maxSeverityApprovalLevel=MAJOR" when i execute the shell in my Jenkins pipeline, following is the output of the Jenkins log:

Oct 27, 2018 11:42:51 AM com.sun.jersey.api.client.filter.LoggingFilter log
INFO: 1 * Client in-bound response
1 < 200
1 < Server: nginx
1 < X-Content-Type-Options: nosniff
1 < Connection: Keep-Alive
1 < X-Static-Version: 61752049ad4a
1 < X-Version: 61752049ad4a
1 < Last-Modified: Sat, 27 Oct 2018 03:42:51 GMT
1 < Date: Sat, 27 Oct 2018 03:42:51 GMT
1 < X-Frame-Options: SAMEORIGIN
1 < Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
1 < X-Render-Time: 0.0205640792847
1 < Cache-Control: no-cache, no-store, must-revalidate, max-age=0
1 < ETag: "728131b779227af33dcada2b39435ce8"
1 < X-Served-By: app-167
1 < Vary: Accept-Language, Cookie
1 < Expires: Sat, 27 Oct 2018 03:42:51 GMT
1 < Content-Length: 232
1 < Content-Language: en
1 < X-Request-Count: 196
1 < Content-Type: application/json
1 < 
{"access_token": "myAcess_token", "scopes": "pullrequest:write account:write", "expires_in": 7200, "refresh_token": "bjuHvMBkAHD22Ennhw", "token_type": "bearer"}

DEBUG: 'Sonar Plug-in for Bitbucket Cloud' skipped because one of the required properties is missing

I think the problem is 'Sonar Plug-in for Bitbucket Cloud' skipped because one of the required properties is missing. But i don't know which property is missing?

### SonarQube Server 1540613079930

Above is the screenshot of my sonarqube. And in bitbucket, doesn't have any comments in my pull request. 1540613271762

Plug-in version, SonarQube version, CI system, build type

Plugin Version: 1.2.3 SonarQUbe version: 6.7.5 CI: Jenkins Buid type: Sonar Scanner

alexantonica commented 5 years ago

How did you solve it?

Soyn commented 5 years ago

What's your problem? I add the parameters approvalFeatureEnabled=true, It's hard to know your issue when i don't have other info in your project. This plugin is running well in my project. Most problem i encounter are the wrong spelling of params. Please check your config.