sonarqube-community-branch-plugin
sonarqube-community-branch-plugin copied to clipboard
Plugin getting not recognized when running inside a container
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:
- Run a docker container and mount the required scanner and java dependencies
- run a sonar scan
- 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.
Have you set the environment variables in the container? https://github.com/mc1arke/sonarqube-community-branch-plugin?tab=readme-ov-file#docker
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.
Closing due to lack of replication steps or follow-on comments