i am running wrapper and scanner but can’t get wrapper results into sonarqube container.
running sonarqube and docker on ubuntu 20.04.
here’s the steps i followed:
0. the only C compiler i have installed is gcc.
-
started sonarqube server using docker container:
sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c05978b6b7db sonarqube:8.3.1-developer “bin/run.sh bin/sona…” About an hour ago Up About an hour 0.0.0.0:9000->9000/tcp sonarq -
i added key sent to me by sales person.
2a. using default embedded DB -
downloaded wrapper for linux
build-wrapper-linux-x86-64 -v
build-wrapper, version 6.9 (linux-x86)
Copyright © 2014-2020 SonarSource SA, info@sonarsource.com
3a. ran wrapper:
build-wrapper-linux-x86-64 --out-dir build_wrapper_output_directory make clean all -
downloaded scanner
sonar-scanner -v
INFO: Scanner configuration file: /home/user01/Downloads/sonar-scanner-4.3.0.2102-linux/conf/sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarScanner 4.3.0.2102
INFO: Java 11.0.3 AdoptOpenJDK (64-bit)
INFO: Linux 5.4.0-37-generic amd64 -
ran scanner:
sonar-scanner -Dsonar.projectKey=Iw0KI1R1ZSBKdW4gMTYgMTA6MDc6MTcgQ0RUIDIwMjANClR5cGU9RVZBTFVBVElPTg0KUGx1Z2lucz1saWNlbnNlLGJyYW5jaCxkZXZlbG9wZXIsYWJhcCxjcHAscGxzcWwsc3dpZnQsdHNxbCx2Ym5ldA0KRWRpdGlvbj1kZXZlbG9wZXINClNlcnZlcklkPSoNClN1cHBvcnQ9ZmFsc2UNCkNvbXBhbnk9VG95b3RhIFVTDQpNYXhMb2M9MTAwMDAwMA0KRGlnZXN0PU1Dd0NGQ1M2SkhNQ0xlZWtYVVNWQW1LVlFReHg4OXF6QWhRRzhaUTIvUW5meG5MbEtKdTVUSjJiUzdmK0h3XD1cPQ0KRXhwaXJhdGlvbj0yMDIwLTA3LTAxDQpFZGl0
-Dsonar.sources=. -Dsonar.host.url=http://localhost:9000
-Dsonar.cfamily.build-wrapper-output=./build_wrapper_output_directory
-Dsonar.login=user01 -Dsonar.password=user01 -Dsonar.c.file.suffixes=*.c
it is scanning about 1300 lines of C code.
5a. scan says:
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 14.481s
INFO: Final Memory: 22M/80M
when i go to host browser, i can login to sonarqube and create new user and new project
but when i go to URL in scanner output, it is empty. i even added invalid code
my C files and it does not detect invalid code in my files.
i tried to attach screen show of GUI but yor site prevents .pdf files.
i attached the scanner output files.
build-wrapper.log (89.3 KB) build-wrapper-dump.json (52.6 KB)
how can i make my wrapper output go into sonarq container? is there a volume mapping
which i need to setup when i start the container?