From 4643c19068866d4486fca40e8891ec6b224eb785 Mon Sep 17 00:00:00 2001 From: Dominic Schabel Date: Sun, 17 Jun 2018 00:59:55 +0200 Subject: [PATCH] Deleted Sonar CircleCI script readded Signed-off-by: Dominic Schabel --- sonarCircleCi.sh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 sonarCircleCi.sh diff --git a/sonarCircleCi.sh b/sonarCircleCi.sh new file mode 100644 index 000000000..066bda912 --- /dev/null +++ b/sonarCircleCi.sh @@ -0,0 +1,30 @@ +#!/bin/sh +# +# Copyright (c) 2015 Bosch Software Innovations GmbH and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# + +echo $CI_PULL_REQUEST pull request +# regular sonar on master +if [ "$CIRCLE_BRANCH" = "master" ]; then + mvn verify license:check sonar:sonar -Dsonar.login=$SONAR_SERVER_TOKEN +# preview in case of pull request - disabled as circle does not fill those with pull reuqests from different directories +else + #if [ -n "$CI_PULL_REQUEST" ]; then + # mvn org.jacoco:jacoco-maven-plugin:prepare-agent verify license:check sonar:sonar -B -e -V \ + # -Dclirr=true \ + # -Dsonar.analysis.mode=issues \ + # -Dsonar.github.pullRequest=`echo $CI_PULL_REQUEST| awk -F'/' '{print $7}'` \ + # -Dsonar.github.login=$SONAR_GITHUB_LOGIN \ + # -Dsonar.github.oauth=$SONAR_GITHUB_OAUTH \ + # -Dsonar.login=$SONAR_SERVER_USER \ + # -Dsonar.password=$SONAR_SERVER_PASSWD + #else + mvn verify license:check + #fi +fi +# but noting in case of other branches