forked from SonarOpenCommunity/sonar-cxx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
63 lines (52 loc) · 2.15 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
language: java
dist: trusty
sudo: required
jdk:
- oraclejdk8
env:
- SONARHOME=/tmp/sonarqube-6.7.2 SONARAPI=SqApi67
- SONARHOME=/tmp/sonarqube-7.0 SONARAPI=SqApi67
matrix:
fast_finish: true
# allow_failures:
# - env: SONARHOME=/tmp/sonarqube-7.0-RC1 SONARAPI=SqApi67
# shorten the VM hostname with the new workaround
# https://github.com/travis-ci/travis-ci/issues/5227#issuecomment-165131913
addons:
hosts:
- myshorthost
hostname: myshorthost
before_cache:
# remove all the artifacts that are installed in local repo because of mvn deploy
- rm -rf $HOME/.m2/repository/org/sonarsource/sonarqube-plugins/cxx
- find $HOME/.m2 -name resolver-status.properties -exec rm {} \;
cache:
directories:
- '$HOME/.m2/repository'
before_install:
- cat /etc/hosts # optionally check the content
# Boost 1.55 is pre-installed on Ubuntu Trusty
#- travis_retry sudo apt-add-repository -y ppa:boost-latest/ppa
#- travis_retry sudo apt-get -qq update
#- travis_retry sudo apt-get -qq install boost1.55
install:
- cd /tmp
- travis_retry wget -q https://sonarsource.bintray.com/Distribution/sonarqube/sonarqube-6.7.2.zip
- unzip -qq sonarqube-6.7.2.zip
- travis_retry wget -q https://sonarsource.bintray.com/Distribution/sonarqube/sonarqube-7.0.zip
- unzip -qq sonarqube-7.0.zip
- travis_retry wget -q https://sonarsource.bintray.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-3.0.3.778.zip
- unzip -qq sonar-scanner-cli-3.0.3.778.zip
- cd -
before_script:
- travis_retry sudo pip install -q requests
- travis_retry sudo pip install -q behave
- travis_retry sudo pip install -q colorama
script:
- env
- mvn install -B -e -V -DskipTests=true
- mvn test -B -e -V
- RAILS_ENV=production PATH=$PATH:/tmp/sonar-scanner-3.0.3.778/bin TestDataFolder=~/build/SonarOpenCommunity/sonar-cxx/integration-tests/testdata behave --no-capture --tags=$SONARAPI
after_failure:
- cat $SONARHOME/logs/sonar.log
- find . -name "*.log" | xargs cat