kroshu / industrial_ci

Easy continuous integration repository for ROS repositories
Apache License 2.0
0 stars 1 forks source link

Adaptation to GitLab #3

Open cmigliorini opened 2 years ago

cmigliorini commented 2 years ago

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

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

Thanks

cmigliorini commented 2 years ago
  • 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