You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by vi...@apache.org on 2021/10/18 02:00:18 UTC

[fineract-cn-accounting] branch develop updated: Adding support for SonarCloud https://issues.apache.org/jira/browse/FINERACT-1409

This is an automated email from the ASF dual-hosted git repository.

victorromero pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-accounting.git


The following commit(s) were added to refs/heads/develop by this push:
     new f551141  Adding support for SonarCloud https://issues.apache.org/jira/browse/FINERACT-1409
f551141 is described below

commit f5511413550565412f2691130037c6cfb4c731c4
Author: Victor Romero <vi...@fintecheando.mx>
AuthorDate: Sun Oct 17 20:58:58 2021 -0500

    Adding support for SonarCloud https://issues.apache.org/jira/browse/FINERACT-1409
---
 .travis.yml                 | 35 +++++++++++------------------------
 api/build.gradle            |  7 +++++++
 component-test/build.gradle |  7 +++++++
 importer/build.gradle       |  7 +++++++
 service/build.gradle        |  7 +++++++
 travis.sh                   |  4 ++--
 6 files changed, 41 insertions(+), 26 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 7a6f3fe..94c9bfa 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,33 +1,20 @@
-#
-# 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.
-#
 language: java
 sudo: false
 jdk:
 - openjdk8
 install: true
+addons:
+  sonarcloud:
+    organization: "apache"
+    token:
+      secure: "c7UwXfUy3srgxKakKLHWnkyRlaLWzAIe5iei2CmBphtIEecHYgmIJPlzQ0aB0a8T4iP4RK4pr6X3z/kXXUksKjE+O3VUyJdzawEsfP5r2v+Qm0YE+YNqQH7T5VWYHVxiLgfidKb09nFPShPxYMg71QVf78iXLE/x0oxw7vBrP0pFAAXsOCU4Um7AoPWg2AVZ+8qyOc1Xn+q9buTf3wkQ7OLK2oZi56ZHG69j2nj9H8ga3i7ueYheSgB8FNzIrjomjtzHtsFyzy5iuKmuGQk5YmuNRhlXsLTCfB157efk9dwI0NRoHwpSY7po3iyLkONXIUVkEUjHr4LL2EvHS4x3SvXGHqbafdYnnrOzmkQYyHQmIJJNbLJB4e8YWH+j2DZqadWDm+gL3jnuOw5Oyvk5TtZ13Dr1vWFj8aMSBAvAfhEry57cbIaOG9EpIQdoQj7bpqta/zaKAURba7sMWrPOm2RjcSP4v [...]
 script: "./travis.sh"
 env:
   global:
-    - BUILD_SNAPSHOTS_BRANCH=develop
-    - ARTIFACTORY_URL=https://mifos.jfrog.io/mifos
-    - ARTIFACTORY_USER=travis-ci
-    - secure: "O51+259R9kiD11VTr2GKR9TOnjuP2lQTVZ02MyyJ3cU4DgaA+Q16nqhlXM5pFuh4IzHwGyhzTrEl95bslLqmUiiQOv+bhiPf0e7uqhJEDZYlOzgRGfIGWtVjqMa1WCOnOO0vzTcpwHRgd4YtwOy3knsR950KJfSg9w0iZzRQT1iTIAJcJ/p19ozUtWm1OImV3aukSmiXry7k3uLZBt7PTXf2/bvRqEQA0y71tYmUWZDV5QrfnFyApBUuoSVGaOyDlLf8YyxWrU2donb4PXvLje3zyrNYoJ7hg2gc1Qtg3NPscWxKebDds4rFcE/Zf6Z96Ctc9i2J/CfRlYT+BmkmqY3nbWU88Z6xWjvhAldj+WYxCt6UfZcuGJHnh+kNY7toQEq7cRlugrMASQZE911DuaphXlBI3zu1bBw0ypBDgLc9NT9+0WBlVEKu8OfoLb+XG9wHM6Z68w7jcbUi5ykOvZBNCEVZo [...]
+  - BUILD_SNAPSHOTS_BRANCH=develop
+  - ARTIFACTORY_URL=https://mifos.jfrog.io/mifos
+  - ARTIFACTORY_USER=travis-ci
+  - secure: O51+259R9kiD11VTr2GKR9TOnjuP2lQTVZ02MyyJ3cU4DgaA+Q16nqhlXM5pFuh4IzHwGyhzTrEl95bslLqmUiiQOv+bhiPf0e7uqhJEDZYlOzgRGfIGWtVjqMa1WCOnOO0vzTcpwHRgd4YtwOy3knsR950KJfSg9w0iZzRQT1iTIAJcJ/p19ozUtWm1OImV3aukSmiXry7k3uLZBt7PTXf2/bvRqEQA0y71tYmUWZDV5QrfnFyApBUuoSVGaOyDlLf8YyxWrU2donb4PXvLje3zyrNYoJ7hg2gc1Qtg3NPscWxKebDds4rFcE/Zf6Z96Ctc9i2J/CfRlYT+BmkmqY3nbWU88Z6xWjvhAldj+WYxCt6UfZcuGJHnh+kNY7toQEq7cRlugrMASQZE911DuaphXlBI3zu1bBw0ypBDgLc9NT9+0WBlVEKu8OfoLb+XG9wHM6Z68w7jcbUi5ykOvZBNCEVZoNJH [...]
 after_failure:
-  - ./gradlew rat
-  - cat api/build/reports/rat/rat-report.txt
+- "./gradlew rat"
+- cat api/build/reports/rat/rat-report.txt
diff --git a/api/build.gradle b/api/build.gradle
index 7799c87..1a92121 100644
--- a/api/build.gradle
+++ b/api/build.gradle
@@ -28,6 +28,7 @@ plugins {
     id "io.spring.dependency-management" version "1.0.8.RELEASE"
     id 'maven-publish'
     id 'java'
+    id "org.sonarqube" version "3.3"
 }
 
 apply from: '../shared.gradle'
@@ -54,3 +55,9 @@ publishing {
         }
     }
 }
+
+sonarqube {
+  properties {
+    property "sonar.projectKey", "apache_fineract-cn-accounting"
+  }
+}
diff --git a/component-test/build.gradle b/component-test/build.gradle
index 047351e..ea9290b 100644
--- a/component-test/build.gradle
+++ b/component-test/build.gradle
@@ -36,6 +36,7 @@ plugins {
     id "org.springframework.boot" version "1.4.3.RELEASE"
     id 'maven-publish'
     id 'java'
+    id "org.sonarqube" version "3.3"
 }
 
 apply from: '../shared.gradle'
@@ -76,3 +77,9 @@ publishing {
         }
     }
 }
+
+sonarqube {
+  properties {
+    property "sonar.projectKey", "apache_fineract-cn-accounting"
+  }
+}
diff --git a/importer/build.gradle b/importer/build.gradle
index cee57b1..0753098 100644
--- a/importer/build.gradle
+++ b/importer/build.gradle
@@ -32,6 +32,7 @@ plugins {
     id "org.springframework.boot" version "1.4.3.RELEASE"
     id 'maven-publish'
     id 'java'
+    id "org.sonarqube" version "3.3"
 }
 
 apply from: '../shared.gradle'
@@ -55,3 +56,9 @@ publishing {
         }
     }
 }
+
+sonarqube {
+  properties {
+    property "sonar.projectKey", "apache_fineract-cn-accounting"
+  }
+}
diff --git a/service/build.gradle b/service/build.gradle
index dacca72..39493ae 100644
--- a/service/build.gradle
+++ b/service/build.gradle
@@ -32,6 +32,7 @@ plugins {
     id 'maven-publish'
     id 'java'
     id 'idea'
+    id "org.sonarqube" version "3.3"
 }
 
 apply from: '../shared.gradle'
@@ -81,3 +82,9 @@ publishing {
         }
     }
 }
+
+sonarqube {
+  properties {
+    property "sonar.projectKey", "apache_fineract-cn-accounting"
+  }
+}
diff --git a/travis.sh b/travis.sh
index d54330d..a342737 100755
--- a/travis.sh
+++ b/travis.sh
@@ -27,13 +27,13 @@ EXIT_STATUS=0
 # Builds and Publishes a SNAPSHOT
 function build_snapshot() {
   echo -e "Building and publishing a snapshot out of branch [$TRAVIS_BRANCH]"
-  ./gradlew -PartifactoryRepoKey=libs-snapshot-local -DbuildInfo.build.number=${TRAVIS_COMMIT::7} artifactoryPublish --stacktrace || EXIT_STATUS=$?
+  ./gradlew sonarqube -PartifactoryRepoKey=libs-snapshot-local -DbuildInfo.build.number=${TRAVIS_COMMIT::7} artifactoryPublish --stacktrace || EXIT_STATUS=$?
 }
 
 # Builds a Pull Request
 function build_pullrequest() {
   echo -e "Building pull request #$TRAVIS_PULL_REQUEST of branch [$TRAVIS_BRANCH]. Won't publish anything to Artifactory."
-  ./gradlew publishToMavenLocal rat || EXIT_STATUS=$?
+  ./gradlew sonarqube publishToMavenLocal rat || EXIT_STATUS=$?
 }
 
 # Builds Forked (non-apache) Repository