forked from arkuznetsov/irac
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Переименован сонар аддон SonarHost sonar.organization lf lf apt-get Правильный путь sudo travis Опять травис Сонаркешь в гитигнор chmod +x chmod
- Loading branch information
Showing
4 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
.vscode/launch.json | ||
sonarlint.json | ||
|
||
\.sonar/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
sudo: required | ||
dist: trusty | ||
addons: | ||
sonarcloud: true | ||
jdk: | ||
- oraclejdk8 | ||
before_install: | ||
- chmod +x travis.sh | ||
cache: | ||
directories: | ||
- '$HOME/.m2/repository' | ||
- '$HOME/.sonar/cache' | ||
script: | ||
- ./travis.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# must be unique in a given SonarQube instance | ||
sonar.projectKey=opensource-irac | ||
|
||
# this is the name displayed in the SonarQube UI | ||
sonar.projectName=opensource-irac | ||
|
||
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. | ||
# Since SonarQube 4.2, this property is optional if sonar.modules is set. | ||
# If not set, SonarQube starts looking for source code from the directory containing | ||
# the sonar-project.properties file. | ||
|
||
sonar.sources=./src | ||
|
||
# Encoding of the source code. Default is default system encoding | ||
sonar.sourceEncoding=UTF-8 | ||
|
||
sonar.organization=sonar-opensource-add | ||
|
||
# sonar.coverageReportPaths=coverage/genericCoverage.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
#!/bin/bash | ||
set -e | ||
|
||
# oscript /usr/share/oscript/lib/opm/src/opm.os run coverage | ||
|
||
temp=`cat packagedef | grep ".Версия(" | sed 's|[^"]*"||' | sed -r 's/".+//'` | ||
version=${temp##*|} | ||
|
||
if [ "$TRAVIS_SECURE_ENV_VARS" == "true" ]; then | ||
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then | ||
sonar-scanner \ | ||
-Dsonar.host.url=https://sonar.silverbulleters.org \ | ||
-Dsonar.analysis.mode=issues \ | ||
-Dsonar.github.pullRequest=$TRAVIS_PULL_REQUEST \ | ||
-Dsonar.github.repository=$TRAVIS_REPO_SLUG \ | ||
-Dsonar.github.oauth=$SONAR_GITHUB_TOKEN \ | ||
-Dsonar.login=$SONAR_TOKEN \ | ||
-Dsonar.scanner.skip=false | ||
|
||
elif [ "$TRAVIS_BRANCH" == "develop" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then | ||
sonar-scanner \ | ||
-Dsonar.host.url=https://sonar.silverbulleters.org \ | ||
-Dsonar.login=$SONAR_TOKEN \ | ||
-Dsonar.projectVersion=$version\ | ||
-Dsonar.scanner.skip=false | ||
fi | ||
fi |