mc1arke / sonarqube-community-branch-plugin

A plugin that allows branch analysis and pull request decoration in the Community version of Sonarqube
GNU Lesser General Public License v3.0
2.26k stars 526 forks source link

Plugin getting not recognized when running inside a container #901

Closed kirubakaran25 closed 3 months ago

kirubakaran25 commented 7 months ago

Describe the bug when executing sonar scan normally with Jenkins pipeline, BRANCH configuration is getting detected but when I run the same scanner inside a container like node:18 for nodejs dependency it won't detect the plugin. Am i missing something? any help would be greatly appreciated

To Reproduce Steps to reproduce the behavior:

  1. Run a docker container and mount the required scanner and java dependencies
  2. run a sonar scan
  3. you can see in the logs no "Auto detected BRANCH configuration" is coming

Expected behavior should be able to use the plugin inside a container

Screenshots If applicable, add screenshots to help explain your problem.

Software Versions

Additional context Add any other context about the problem here.

xC0dex commented 6 months ago

Have you set the environment variables in the container? https://github.com/mc1arke/sonarqube-community-branch-plugin?tab=readme-ov-file#docker

mc1arke commented 5 months ago

I suspect you're either missing Git metadata (not being copied into your container?) or not copying the CI's environment variables into your container. This doesn't sound like a plugin problem, but I don't have enough evidence to try and replicate this.

mc1arke commented 3 months ago

Closing due to lack of replication steps or follow-on comments