From 7144a39a1ef35e9962236f7f041a681bc62ea5ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Mon, 31 Oct 2016 15:45:56 +0100 Subject: Automate the sonar-qube scanner submission in the ci process --- .gitlab-ci.yml | 8 ++++++++ docker/biboumi-test/fedora/Dockerfile | 1 + 2 files changed, 9 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f0509ef..035cf3b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -140,3 +140,11 @@ test:coverity: - cov-build --dir cov-int make biboumi test_suite -j$(nproc || echo 1) - tar czvf biboumi_coverity.tgz cov-int - curl --form token=$COVERITY_TOKEN --form email=louiz@louiz.org --form file=@biboumi_coverity.tgz --form version="$(git rev-parse --short HEAD)" --form description="Automatic submission by gitlab-ci" https://scan.coverity.com/builds?project=louiz%2Fbiboumi + +test:sonar-qube: + stage: test + image: biboumi-test-fedora:latest + script: + - cmake .. + - ~/sonar-scanner/bin/build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir ./bw-outputs make biboumi test_suite + - ~/sonar-scanner/bin/sonar-scanner -Dsonar.host.url=https://sonarqube.com -Dsonar.login=$SONAR_LOGIN diff --git a/docker/biboumi-test/fedora/Dockerfile b/docker/biboumi-test/fedora/Dockerfile index fb6dab4..0d0a9ea 100644 --- a/docker/biboumi-test/fedora/Dockerfile +++ b/docker/biboumi-test/fedora/Dockerfile @@ -60,6 +60,7 @@ RUN rm -rf /charybdis RUN su - tester -c "echo export LANG=en_GB.utf-8 >> /home/tester/.bashrc" COPY coverity /home/tester/coverity +COPY sonar-scanner-2.8 /home/tester/sonar-scanner WORKDIR /home/tester USER tester -- cgit v1.2.3