-
Notifications
You must be signed in to change notification settings - Fork 10
/
.travis.yml
44 lines (35 loc) · 1.23 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
sudo: required
language: java
services: docker
jdk: oraclejdk8
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
env:
matrix:
- SONARQUBE_VERSION=5.6.6 PATH=/tmp/sonar-scanner-2.5/bin:$PATH
- SONARQUBE_VERSION=6.0 PATH=/tmp/sonar-scanner-2.5/bin:$PATH
- SONARQUBE_VERSION=6.1 PATH=/tmp/sonar-scanner-2.5/bin:$PATH
- SONARQUBE_VERSION=6.2 PATH=/tmp/sonar-scanner-2.5/bin:$PATH
- SONARQUBE_VERSION=6.3 PATH=/tmp/sonar-scanner-2.5/bin:$PATH
install:
- echo "FROM sonarqube:${SONARQUBE_VERSION}-alpine" > Dockerfile.ci
- echo "COPY sonar-puppet-plugin/build/libs/* /opt/sonarqube/extensions/plugins/" >> Dockerfile.ci
- cd /tmp
- wget https://sonarsource.bintray.com/Distribution/sonar-scanner-cli/sonar-scanner-2.5.zip
- unzip sonar-scanner-2.5.zip
- cd -
- gem install puppet -v 3.8.6
script:
- ./gradlew build
- docker build -t sonar-puppet -f Dockerfile.ci .
- docker run -d --name sonarqube -p 9000:9000 -p 9092:9092 sonar-puppet
- ./gradlew functionalTest
before_install:
- chmod +x gradlew
after_success:
- ./gradlew jacocoTestReport coveralls