Files
hawkbit/sonarCircleCi.sh
Kai Zimmermann 64deaeea3c Remove swagger and minor feature extensions and bug fixes
- Various Bug fixes and improvements
- Management API extended
- Swagger removed
- Guava Upgraded to 19
2016-01-21 13:42:38 +01:00

30 lines
1.1 KiB
Bash

#
# 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_USER -Dsonar.password=$SONAR_SERVER_PASSWD
# preview in case of pull request
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