Open adamparmelee opened 6 years ago
i have a same problem, fixed with plugin update
Having the same issue, where no codeclimate.json
is generated. (Plugin Ver. 3.0.1)
My gitlab-ci.yml
config is:
sonarqube analysis preview:
stage: analysis
except:
- master
tags:
- aws
image: gradle:4.8.1-jdk8
before_script:
- export GRADLE_USER_HOME=`pwd`/.gradle
script:
- >
gradle -info -Dsonar.login=$SONAR_LOGIN_TOKEN -Dsonar.host.url=$SONAR_URL -Dsonar.analysis.mode=preview
-Dsonar.gitlab.project_id=$CI_PROJECT_ID -Dsonar.gitlab.commit_sha=$CI_COMMIT_SHA -Dsonar.gitlab.ref_name=$CI_COMMIT_REF_NAME
-Dsonar.gitlab.json_mode=CODECLIMATE -Dsonar.gitlab.failure_notification_mode=commit-status
sonarqube
- ls -al
artifacts:
expire_in: 1 day
paths:
- codeclimate.json
Hi, Have you a log ?
I will provide one tomorrow. The log of the scanner, Sonarqube or both?
scanner log, please
Here is the obfuscated log from a execution on our gitlab. (Just removed all customer names) gitlab-scanner-log.log
Sonar Gitlab Plugin don't start Have you set GITLAB_URL & GITLAB_USER_TOKEN in sonarqube admin ?
Yes, I inserted https://gitlab.com
as GITLAB_URL and my personal access token (with Owner permissions) as GITLAB_USER_TOKEN.
Is it necessary to access the sonarqube instance with https
?
no, verify password has saved
I renewed the gitlab access token and tried again. (No more save button visible in the settings) No change happens in log and still no codeclimate.json
.
Ok, add debug mode in command line, gradle -d
and get full log.
As you wish :wink: (This time its a local execution)
Thanks,
13:11:53.712 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] 'GitLab Commit Issue Publisher' skipped because one of the required properties is missing
Properties is mandatory : GitLabPlugin.GITLAB_URL, GitLabPlugin.GITLAB_USER_TOKEN, GitLabPlugin.GITLAB_PROJECT_ID, GitLabPlugin.GITLAB_COMMIT_SHA, GitLabPlugin.GITLAB_REF_NAME
What is sonarqube version use ?
As far as I see all of them are defined with the project setting and the execution parameters.
The sonarqube version is the 6.7.4 LTS
Ok, verify if GITLAB_USER_TOKEN is saved because a bug in UI in sonarqube 6.7 You have to save twice
Try to set -Dsonar.gitlab.url=...
in command line
Saved two times, didn't work out.
~~When the sonar.gitlab.url
and sonar.gitlab.user_token
are set via command line parameter it works.
I will test again if only the url is enough.~~
When the sonar.gitlab.url
is set via command line parameter it works perfectly. A strange behaviour, but this workaround is fine for me
after my CI runs I'm able to see results in sonarqube, but codeclimate.json isn't being created...
here's what I'm running in gitlab-ci.yml
sonarqube_preview_feature_job: stage: test only: