Repository: samza Updated Branches: refs/heads/master 471f81d78 -> 1cf98443f
SAMZA-1431: Enable SonarCloud integration with Travis-CI. These are modifications needed to integrate Travis-CI with SonarCloud. Also, the JaCoCo plugin is enabled in gradle for code coverage reporting to SonarCloud. For reference, here is the request to Apache Infra to enable Travis-CI: https://issues.apache.org/jira/browse/INFRA-15132 nickpan47 isolis Author: Daniel Nishimura <[email protected]> Reviewers: Jacob Maes <[email protected]> Closes #305 from dnishimura/samza-1431-sonarcloud Project: http://git-wip-us.apache.org/repos/asf/samza/repo Commit: http://git-wip-us.apache.org/repos/asf/samza/commit/1cf98443 Tree: http://git-wip-us.apache.org/repos/asf/samza/tree/1cf98443 Diff: http://git-wip-us.apache.org/repos/asf/samza/diff/1cf98443 Branch: refs/heads/master Commit: 1cf98443f15fec70ad7a9f77bd5740ab546a4d50 Parents: 471f81d Author: Daniel Nishimura <[email protected]> Authored: Wed Oct 4 10:39:42 2017 -0700 Committer: Jacob Maes <[email protected]> Committed: Wed Oct 4 10:39:42 2017 -0700 ---------------------------------------------------------------------- .travis.yml | 20 +++++++++++++++++--- build.gradle | 1 + sonar-project.properties | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/samza/blob/1cf98443/.travis.yml ---------------------------------------------------------------------- diff --git a/.travis.yml b/.travis.yml index 5ed9526..05760fd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,17 +18,31 @@ language: java dist: trusty - sudo: false +addons: + sonarcloud: + organization: samza + branches: + - master + - travis-sonarcloud jdk: - oraclejdk8 +script: + - ./gradlew clean build + - type sonar-scanner &>/dev/null; if [ $? -eq 0 ]; then sonar-scanner; else echo "Not running sonar"; fi + before_cache: - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock - rm -fr $HOME/.gradle/caches/*/plugin-resolution/ cache: directories: - - $HOME/.gradle/caches/ - - $HOME/.gradle/wrapper/ + - "$HOME/.gradle/caches/" + - "$HOME/.gradle/wrapper/" + - "$HOME/.sonar/cache/" + +env: + global: + - secure: S8MhhgBq1SVgthw3jDBmsKtUu1so4t+uVMSEpGSVENpxJc55APQKMJNfZAtxLlObjJSClTvtZj0tjNTTrfyKebrunJ1xGriJRTCvhiKeywDE3iRHBIV4ZIUS8Yc4i8CqVTF8gqbshf2gvwc+kvOj2r2BvMPPM3MkjcTI3f9q56I= http://git-wip-us.apache.org/repos/asf/samza/blob/1cf98443/build.gradle ---------------------------------------------------------------------- diff --git a/build.gradle b/build.gradle index b10241a..c710053 100644 --- a/build.gradle +++ b/build.gradle @@ -105,6 +105,7 @@ allprojects { subprojects { apply plugin: 'eclipse' apply plugin: 'project-report' + apply plugin: 'jacoco' tasks.withType(Test) { test { http://git-wip-us.apache.org/repos/asf/samza/blob/1cf98443/sonar-project.properties ---------------------------------------------------------------------- diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..706d99c --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,35 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +sonar.projectKey=org.apache.samza +sonar.projectName=Apache Samza + +# Metadata +sonar.links.homepage=https://samza.apache.org +sonar.links.ci=https://travis-ci.org/apache/samza +sonar.links.issue=https://issues.apache.org/jira/projects/SAMZA/issues + +# Standard properties +sonar.sources=src/main +sonar.java.binaries=build/classes +sonar.tests=src/test + +# Code coverage reporting +sonar.jacoco.reportPaths=build/jacoco/test.exec + +# List of subprojects here +sonar.modules=samza-api,samza-autoscaling,samza-azure,samza-core,samza-elasticsearch,samza-hdfs,samza-kafka,samza-kv-inmemory,samza-kv-rocksdb,samza-kv,samza-log4j,samza-rest,samza-shell,samza-test,samza-yarn
