Skip to content
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

Adaptation to GitLab #3

Open
cmigliorini opened this issue Aug 27, 2022 · 1 comment
Open

Adaptation to GitLab #3

cmigliorini opened this issue Aug 27, 2022 · 1 comment

Comments

@cmigliorini
Copy link

Hi, I need to use this in GitLab, and I'm struggling to understand some details in sonarqube.sh.

  • where are BRANCH, PR_NUMBER, PR_BASE, PR_BRANCH supposed to come from?
  • can you confirm it is intentional that Sonar token is supposed to be passed in ANALYZER_TOKEN rather than in SONAR_TOKEN as the documentation indicates?

I'll propose a pull request when I'm done.

Thanks

@cmigliorini
Copy link
Author

  • where are BRANCH, PR_NUMBER, PR_BASE, PR_BRANCH supposed to come from?

My understanding is that it tries to help sonar-scanner in determining where it's standing in regards to PRs and Branches analyses. I find that (in GitLab context at least) sonar-scanner does a great job -- provided it's provided with GitLab CI* and GITLAB_* variables, which current isolation prevents.

I was able to pass these using DOCKER_RUN_OPTS.

I also tried all combinations of CI=true and ISOLATION=shell variables, to no avail. If any of these is provided, builds fail.

  • can you confirm it is intentional that Sonar token is supposed to be passed in ANALYZER_TOKEN rather than in SONAR_TOKEN as the documentation indicates?

That, and ANALYZER= "sonarqube" will be added to documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant