-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrated to sonarqube v7.9.1 API #253
Conversation
It is amazing, can you tell me the usage, it is the same as old plugin? @javamachr |
Yes it is drop in replacement - same usage as before. I use it combined with sonar-community-branch plugin and so far no issues found. |
My command:
My sonarqube version: Community Edition 7.9.1 |
I found the reason., Thanks! |
Thanks for migrating @javamachr. |
#222 |
Yes this PR makes it work with either SonarQube Developer Edition or SonarQube Community with Sonar Community Branch plugin installed. |
could you please share your exp? thanks! |
|
Are there any operating procedures? @javamachr |
It works the same way it did. Only difference is that preview mode was replaced by publish mode with branch name - preview is no more supported and was replaced by branch functionality in SonarQube. Example: |
@javamachr |
tested & works , thank you! |
No, this PR has not been merged yet so there is no release version yet. You need to build it yourself. To make it work with v7.9.1 you need to manually checkout code from this https://github.com/javamachr/sonar-gitlab-plugin repo and run mvn clean package to build it. Then take the jar file from target directory and copy it to your sonar plugin directory. |
here is my .gitlab-ci.yml file:
here is the list of installed plugins that i have:
|
That seems to be params issue. Plugin now works as expected. This can occur when either wrong projectID is used or something is wrong with config params. Please check that those params are passed correctly and have right value(try echoing the command with params before execution). |
Hi thanks for this awesome work. Any merge to master ETA ? |
@javamachr, I've got the solution why the job kept failing. That was definitely on my end. I had wrong sonar.gitlab.user_token that was provided on sonarqube server. Everything works now as specified. I do appreciate you help, my friend! Thanks a lot for your work again! |
Confirm this is working on Sonarqube Enterprise 7.9.1 Sonarqube 8 has native support for gitlab EXCEPT MR decorations. We'll continue using this plugin until those are implemented. This plugin cannot coexist with sonarqube 8 (it doesn't even boot), but the gitlab configurations from community plugin are migrated. You need to add "API" scope to the gitlab sonarqube application configuration though, previously it was enough to just read the user info. |
Getting error when run "mvn clean package": openjdk version "12.0.1" |
Try older JVM. I only tested with 8 and 11. |
Pretty please, make a release of the plugin with this PR! |
I built https://github.com/unitysipu/sonar-gitlab-plugin . Rename this .zip to .jar (don't extract it). No warranty, if it breaks you get to keep both pieces, etc. |
@javamachr - Could you expose a release directly from your repo's releases so anyone who has an automated deployment can run your changes? |
As requested released from my repo here |
Great work @javamachr, thank you very much! |
@kortov try the version @javamachr built. https://github.com/javamachr/sonar-gitlab-plugin/releases/tag/v4.1.0 |
@stevehipwell thanks, I know about it :) I mean the repo is not maintained since spring of 2019 (And once again, it's okay, it's an opensource and it's voluntary) but I don't think that's okay that repo is actually is freezed, there is no resolved issues, no merged PR's . I guess when the repo seems not actively maintained there is less chance that people will use it or improve it via PR's |
Btw as off-topic, I do love the code quality of the project, nearly the 100% coverage (of course it's bug-prone without mutation or fuzz testing) is awesome, e.g I'd need years to get such coding level to write or maintain such project on my own |
Note that SonarQube itself added a Gitlab integration in the latest paid version. |
The plugin from @javamachr does not work for me under SQ 8.2 CE anymore. Can anybody confirm this or am I missing some settings? |
8.2 should have full gitlab support in the enterprise edition deprecating the need for this plugin. It's possible 8.2 is incompatible because of that. |
For the community edition, you will also need the community branch plugin which doesn't work either : mc1arke/sonarqube-community-branch-plugin/issues/112 |
It does work with 8.x, you need to compile it yourself from this PR, though. |
I already did that, the branch plugin is working for me. |
Worked for me in combination with sonarqube-community-branch-plugin. Worked with:
No configuration needed in Sonar/GitLab but the installation of both plugins in Sonar and the generation of tokens in both Sonar and GitLab. Configuration used in GitLab CI pipeline (in fact, this is the whole
Variables marked with (*) are to be defined with your values. |
Is there any way to support sonarqube 8.2 community edition? |
This was tested only on 7.9 but it should not be a problem to update it to v8.x - but it depends on Community branch plugin - so you need to wait until they update it to v8.2. I believe they have PR for v8.1 open now. |
@javamachr In fact, someone has made a version that supports 8.2 in sonarqube branch plugin, and I have tested it and it works. sonar branch plugin 8.2 |
Then try newest PR #280 |
Did somebody check how it works with Sonar 8.4? |
We use this fork in the latest versin 4.2 and it still works with SonarQube 8.4.2. |
Is https://github.com/mc1arke/sonarqube-community-branch-plugin required with this @javamachr 's fork? |
We don't use the plugin as we only run analysis on our main branches - so no it is not required. |
Still works on 8.6 |
I just released v4.3.0 compatible with sonar >= v8.6.0.39681. |
@javamachr in the releases page of your fork there is no option to download the jar. Should I build it manually? Thank you for everything! |
Sorry I forgot to publish the release draft - its there and public now. |
@javamachr I don't know if this is the best place to ask this but I'm having some issues configurating the plugin. I use detached pipelines (only for merge requests) and I use the Using the plugin (I'm first trying with older versions) the The discussion also are not working. If I go to gitlab to reply them, the gitlab UI bugs and no text area is shown. is this only with me? EDIT: Just cloned the project to see how the plugin requests gitlab api to create commit statuses. It is not using the pipeline ID supported by API. I will test it here. EDIT2: Appears that the API doesn't support detached pipelines :( |
Migrated to sonarqube 7.9.1 API, dropped deprecated parts like preview mode - now using always publish.
For 8.2 see #280