This is an automated email from the ASF dual-hosted git repository.
chanjarster pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-toolkit.git
The following commit(s) were added to refs/heads/master by this push:
new aea2639 SCB-1591 sonarcloud.io integration (#49)
aea2639 is described below
commit aea26395780393fd3fece20812c67785b205a073
Author: Daniel Qian <[email protected]>
AuthorDate: Fri Nov 15 08:44:57 2019 +0800
SCB-1591 sonarcloud.io integration (#49)
SCB-1591 sonarcloud.io integration
---
.travis.yml | 6 ++++++
scripts/test.sh | 24 +++++++++++++++---------
2 files changed, 21 insertions(+), 9 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index f9b9704..8b6f659 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -17,6 +17,12 @@
sudo: required
+addons:
+ sonarcloud:
+ organization: "apache"
+ token:
+ secure:
"1Pp5GWvkXduqhSG0Kuy9pMO262od+D+MIRZ6NtkYDy9wPrU1A8cCB3eC9/i0Q29X+BuzOQ17oW1UgUhdIV2VSx2EwF6xpCT9KNhBqV/Y8dzvw9RD6dW/QHgbv4U9L4I5EriM3dWuWIl31yoD4LCwWPHkLIysLiiSqjSCceeANIGE/ErqfokZOuZ2ghmN5DwKLyS8U/28N9mBu3U6WC8DjIJzT4jS9Z6m4w5bd08RoxtQIA2XoeYsjoEbaZJXUwl7ktoZVXwyOwpGiMa8YcScVDEepd7+QlFtyNQ4PUg0TBriiSAl9K7UEpcYODBS6nbPIUk//geZvoBUA2QgrBgHQpEosYD81qJOdCP1+TPJbiYpGbgIzE4qR3CIotJJPDkv9mdPRfhRaubVkjBkXQWNhSXnWMQjeG1re+A8ZPL1dkBMHw06aMfS/kwPFzgq4QJ01x3DegdMKHt1s/B5vM+iqRbcrDOjc
[...]
+
cache:
directories:
- "$HOME/.m2"
diff --git a/scripts/test.sh b/scripts/test.sh
index a3b61cd..55d9d72 100755
--- a/scripts/test.sh
+++ b/scripts/test.sh
@@ -24,7 +24,7 @@ if [ "$TAGGEDCOMMIT" == "" ]; then
else
TAGGEDCOMMIT=true
fi
-echo $TAGGEDCOMMIT
+echo "TAGGEDCOMMIT=$TAGGEDCOMMIT"
if [ "$TAGGEDCOMMIT" == "true" ]; then
echo "Skipping the installation as it is tagged commit"
@@ -36,12 +36,18 @@ else
fi
echo "Running the unit tests and integration tests here!"
- mvn clean install -Pjacoco coveralls:report
+ echo "TRAVIS_SECURE_ENV_VARS=$TRAVIS_SECURE_ENV_VARS";
+ if [ "$TRAVIS_SECURE_ENV_VARS" == "true" ]; then
+ echo "Running sonar build";
+ mvn clean install -Pjacoco coveralls:report sonar:sonar
-Dsonar.projectKey=servicecomb-toolkit
+ else
+ mvn clean install -Pjacoco coveralls:report
+ fi;
-if [ $? == 0 ]; then
- echo "${green}Installation Success..${reset}"
-else
- echo "${red}Installation or Test Cases failed, please check the above
logs for more details.${reset}"
- exit 1
-fi
-fi
+ if [ $? == 0 ]; then
+ echo "${green}Installation Success..${reset}"
+ else
+ echo "${red}Installation or Test Cases failed, please check the above logs
for more details.${reset}"
+ exit 1
+ fi
+fi
\ No newline at end of file