Skip to content
Snippets Groups Projects
Commit a1a1cd55 authored by Soeren Peters's avatar Soeren Peters
Browse files

Enable sonarscanner job, adapt the sonarqube url and add the projectkey as a gitlab variable.

parent 7712951b
1 merge request!3Add manual numerical gpu test and enable the sonar-scanner again.
...@@ -488,16 +488,15 @@ gcov_to_elladan: ...@@ -488,16 +488,15 @@ gcov_to_elladan:
############################################################################### ###############################################################################
# sonar-scanner runs sonar-project.properties # sonar-scanner runs sonar-project.properties
# the reports in this file needs to match the artifacts. # the reports in this file needs to match the artifacts.
# This job only run on the development branch of the parent repository, not on forks!
sonar-scanner: sonar-scanner:
stage: deploy stage: deploy
only: only:
refs: - develop
- develop #- develop@git.rz.tu-bs.de/irmb/VirtualFluids_dev
when: manual
variables: variables:
SONAR_HOST_URL: "http://finrod.irmb.bau.tu-bs.de/sonarqube" SONAR_HOST_URL: "http://gitlab-runner01.irmb.bau.tu-bs.de/sonarqube/"
needs: ["cppcheck","clang-tidy","gcov_gcc_9","gcc_9_rebuild"] needs: ["cppcheck","clang-tidy","gcov_gcc_9","gcc_9_rebuild"]
...@@ -507,7 +506,9 @@ sonar-scanner: ...@@ -507,7 +506,9 @@ sonar-scanner:
- wget https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.0.0.1744-linux.zip - wget https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.0.0.1744-linux.zip
- unzip sonar-scanner-cli-4.0.0.1744-linux.zip - unzip sonar-scanner-cli-4.0.0.1744-linux.zip
- cd sonar-scanner-4.0.0.1744-linux/ - cd sonar-scanner-4.0.0.1744-linux/
- echo 'sonar.host.url=http://finrod.irmb.bau.tu-bs.de/sonarqube' >> conf/sonar-scanner.properties - echo 'sonar.projectKey=$SONARQUBE_PROJECT_KEY_DEVELOP' >> $CI_PROJECT_DIR/sonar-project.properties
- cat $CI_PROJECT_DIR/sonar-project.properties
- echo 'sonar.host.url=$SONAR_HOST_URL' >> conf/sonar-scanner.properties
- echo 'sonar.sourceEncoding=UTF-8' >> conf/sonar-scanner.properties - echo 'sonar.sourceEncoding=UTF-8' >> conf/sonar-scanner.properties
- cat conf/sonar-scanner.properties - cat conf/sonar-scanner.properties
- export PATH+=:$(pwd)/bin - export PATH+=:$(pwd)/bin
......
# must be unique in a given SonarQube instance # must be unique in a given SonarQube instance
sonar.projectKey=vf:project:develop sonar.projectKey=vf:project:develop
# --- optional properties ---
# defaults to project key
sonar.projectName=VirtualFluids_dev sonar.projectName=VirtualFluids_dev
# defaults to 'not provided'
#sonar.projectVersion=1.0 sonar.projectVersion=0.1
sonar.language=cxx sonar.language=cxx
...@@ -36,4 +34,9 @@ sonar.cxx.gcc.reportPath=build/gcc_warnings.txt ...@@ -36,4 +34,9 @@ sonar.cxx.gcc.reportPath=build/gcc_warnings.txt
sonar.cxx.funccomplexity.threshold=10 sonar.cxx.funccomplexity.threshold=10
sonar.cxx.funcsize.threshold=20 sonar.cxx.funcsize.threshold=20
\ No newline at end of file
# project key
# must be unique in given sonarqube instance
# -> is insert by gitlab CI
# sonar.projectKey=$SONARQUBE_PROJECT_KEY_DEVELOP
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment