sonarqube-community-branch-plugin icon indicating copy to clipboard operation
sonarqube-community-branch-plugin copied to clipboard

Plugin getting not recognized when running inside a container

Open kirubakaran25 opened this issue 10 months ago • 2 comments

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

  • SonarQube Version: 9.9 LTS
  • Plugin Version: 1.14.0
  • SonarScanner: 5.0.1.3006
  • Java: 17.0.2

Additional context Add any other context about the problem here.

kirubakaran25 avatar Apr 19 '24 18:04 kirubakaran25

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

xC0dex avatar May 06 '24 12:05 xC0dex

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 avatar Jun 13 '24 14:06 mc1arke

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

mc1arke avatar Aug 11 '24 14:08 mc1arke