forked from quaddy-services/DeadlineReminder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
32 lines (29 loc) · 1.3 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
language: java
# https://docs.travis-ci.com/user/sonarcloud/
addons:
sonarcloud:
organization: "quaddy-services-github" # the key of the org you chose at step #3
# see SONAR_TOKEN property in https://travis-ci.org/quaddy-services/escape-from-intranet/settings
# token:
# secure: "*********" # encrypted value of your token
script:
# see https://community.sonarsource.com/t/travis-plugin-is-failing-on-external-pull-request/807/8
# see https://docs.travis-ci.com/user/pull-requests#double-builds-on-pull-requests
# see https://github.com/Shippable/support/issues/1144
- echo "SONAR_SCANNER_HOME=${SONAR_SCANNER_HOME}";
- echo "TRAVIS_PULL_REQUEST=${TRAVIS_PULL_REQUEST}";
# see https://docs.travis-ci.com/user/environment-variables/
- echo "TRAVIS_SECURE_ENV_VARS=${TRAVIS_SECURE_ENV_VARS}";
- >
if [ "${TRAVIS_SECURE_ENV_VARS}" == "true" ]; then
echo;
echo "Running sonar build";
# the following command line builds the project, runs the tests with coverage and then execute the SonarCloud analysis
mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent install sonar:sonar;
fi;
- >
if [ "${TRAVIS_SECURE_ENV_VARS}" == "false" ]; then
echo;
echo "Running pullrequest build";
mvn clean install;
fi;