From b84481d69bd83921c73ea020214b8f9bc4836123 Mon Sep 17 00:00:00 2001 From: Malaber <32635600+Malaber@users.noreply.github.com> Date: Sun, 26 May 2019 11:45:40 +0200 Subject: [PATCH] Add sonarqube Code analysis --- .dockerignore | 1 + .travis.yml | 4 ++++ README.md | 2 +- sonar-project.properties | 6 ++++++ 4 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 sonar-project.properties diff --git a/.dockerignore b/.dockerignore index 6cbf964..a955123 100644 --- a/.dockerignore +++ b/.dockerignore @@ -9,3 +9,4 @@ tmp/** .travis-yml docker-compose.yml README.md +sonar-project.properties \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index c4e3d7c..09c5056 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,11 @@ language: ruby +addons: + sonarcloud: + organization: turniere-dhbw env: - RAILS_ENV=test script: + - sonar-scanner - bundle exec rails db:migrate - bundle exec rails spec notifications: diff --git a/README.md b/README.md index 49d2bc4..aa3d46a 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # turniere-backend -[![Build Status](https://travis-ci.org/turniere/turniere-backend.svg?branch=master)](https://travis-ci.org/turniere/turniere-backend) [![pipeline status](https://gitlab.com/turniere/turniere-backend/badges/master/pipeline.svg)](https://gitlab.com/turniere/turniere-backend/commits/master) [![Coverage Status](https://coveralls.io/repos/gitlab/turniere/turniere-backend/badge.svg?branch=master)](https://coveralls.io/gitlab/turniere/turniere-backend?branch=master) [![](https://img.shields.io/badge/Protected_by-Hound-a873d1.svg)](https://houndci.com) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/c273578244de4830b30f9f61ba35247a)](https://app.codacy.com/app/Malaber/turniere-backend) +[![Build Status](https://travis-ci.org/turniere/turniere-backend.svg?branch=master)](https://travis-ci.org/turniere/turniere-backend) [![pipeline status](https://gitlab.com/turniere/turniere-backend/badges/master/pipeline.svg)](https://gitlab.com/turniere/turniere-backend/commits/master) [![Coverage Status](https://coveralls.io/repos/gitlab/turniere/turniere-backend/badge.svg?branch=master)](https://coveralls.io/gitlab/turniere/turniere-backend?branch=master) [![](https://img.shields.io/badge/Protected_by-Hound-a873d1.svg)](https://houndci.com) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/c273578244de4830b30f9f61ba35247a)](https://app.codacy.com/app/Malaber/turniere-backend) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=turniere_turniere-backend&metric=alert_status)](https://sonarcloud.io/dashboard?id=turniere_turniere-backend) Ruby on Rails application serving as backend for turnie.re diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..1d7cd9a --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,6 @@ +sonar.projectKey=turniere_turniere-backend +sonar.organization=turniere-dhbw +sonar.projectName=turniere-backend +sonar.projectVersion=1.0 +sonar.sources=app +sonar.ruby.coverage.reportPaths=coverage/.resultset.json \ No newline at end of file