gabrie-allaigre / sonar-gitlab-plugin

Add to each commit GitLab in a global commentary on the new anomalies added by this commit and add comment lines of modified files
GNU Lesser General Public License v3.0
713 stars 208 forks source link

'GitLab Commit Issue Publisher' skipped because one of the required properties is missing #83

Open rafehi opened 7 years ago

rafehi commented 7 years ago

I've been trying to diagnose this issue without any luck. As far as I can tell, I have all the required configurations:

docker run -v $(pwd):/root/src newtmitch/sonar-scanner sonar-scanner -X -Dsonar.host.url=http://host -Dsonar.analysis.mode=preview -Dsonar.projectKey=key -Dsonar.sources=src -Dsonar.login=user -Dsonar.password=pass -Dsonar.gitlab.project_id=$CI_PROJECT_PATH -Dsonar.gitlab.commit_sha=$CI_COMMIT_SHA -Dsonar.gitlab.ref_name=$CI_COMMIT_REF_NAME

The script succeeds however Gitlab isn't updated and the following message is logged: 'GitLab Commit Issue Publisher' skipped because one of the required properties is missing

Any idea what might be causing it? It definitely runs the plugin, as if I exclude -Dsonar.analysis.mode=preview, the plugin fails, complaining that it can't run if not in preview mode.

gabrie-allaigre commented 7 years ago

Hi, Required is gitlab url, user token for gitlab, sha and project id

rafehi commented 7 years ago

Strange. It's definitely configured in the server as https://gitlab.com. However, it did work when I passed it in as a command line function.

Is there a situation in which the global config is ignored?

gabrie-allaigre commented 7 years ago

normally no

andrzejwp commented 6 years ago

@gabrie-allaigre I think you might want to update this information, as the ref_name param is also required at the moment.

gabrie-allaigre commented 6 years ago

Hi, In version 3.0.0, ref_name is required.

grimmjo commented 6 years ago

Hi @gabrie-allaigre,

would be cool to document this in the changelog as breaking api change. I took me 2 hours to figure out what the property had changed. Should I make a pull request for the README.md?

gabrie-allaigre commented 6 years ago

Hi, sorry for breaking api. Yes accept PR

grimmjo commented 6 years ago

@gabrie-allaigre here is my PR #118

gabrie-allaigre commented 6 years ago

Thanks

bartshappee commented 5 years ago

Strange. It's definitely configured in the server as https://gitlab.com. However, it did work when I passed it in as a command line function.

Is there a situation in which the global config is ignored?

I've been trying to figure this out for weeks, I also had to manuall add -Dsonar.girlab.url=https://gitlab.com to my gradle build to trigger the post actions when its configured in the sonar server. Any hints on where to look if i want to submit a PR for a fix?

bhazied commented 4 years ago

alays i receive this message 'GitLab Commit Issue Publisher' skipped because one of the required properties is missing

my command is below

/opt/sonar-scanner/bin/sonar-scanner -X -Dsonar.host.url=http://\:9000 -Dsonar.gitlab.user_token=######## -Dsonar.srces=. -Dsonar.gitlab.commit_sha=58bb83a05f0b94d67ccbf5662fe247e1f34d9685 -Dsonar.projectKey=ETCB:master -Dsonar.gitlab.url= -Dsonar.gitlab.ignore_certificate=false -Dsonar.gitlab.project_id=26 -Dsonat.gitlab.ref_name=origin/master -Dsonar.projectName=estesting-back -Dsonar.projectBaseDir=/home/FOCUS/uid0918/works/Projects/E-testing/solution/e-testing -Dsonar.login=b554e622db1f7a4715699c5a902c621f32be51ac -Dsonar.analysis.mode=publish

i think that i have all required parameters, can you help please?