From 9ba7cb69cc83345924ea9d94e72e074182c84660 Mon Sep 17 00:00:00 2001 From: Ivaylo Ivanov Date: Sun, 29 Sep 2019 18:16:56 +0200 Subject: [PATCH] Add sonar scanner --- .gitlab-ci.yml | 9 +++++++++ sonar-project.properties | 16 ++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 .gitlab-ci.yml create mode 100644 sonar-project.properties diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..212c73f --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,9 @@ +--- +stages: + - scan + +sonar_scan: + stage: scan + image: registry.ivayloivanov.eu/infstrct/dockerfiles/amd64/sonar-scanner-base + script: + - $HOME/sonar-scanner/bin/sonar-scanner -Dsonar.login=$SONAR_TOKEN diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..2a89f2b --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,16 @@ +#----- Default SonarQube server +sonar.host.url=http://192.168.3.2:9000 + +# must be unique in a given SonarQube instance +sonar.projectKey=tuwien:unix + +# defaults to project key +sonar.projectName=tuwien:unix +# defaults to 'not provided' +sonar.projectVersion=1.0.0 + +# Path is relative to the sonar-project.properties file. Defaults to . +sonar.sources=. + +# Encoding of the source code. Default is default system encoding +sonar.sourceEncoding=UTF-8