forked from spotbugs/sonar-findbugs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
48 lines (48 loc) · 1.93 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
language: java
sudo: false
dist: trusty
jdk:
- oraclejdk8
env:
# latest LTS
- SONAR_VERSION=6.7.1 SONAR_JAVA_VERSION=5.1.0.13090
# 7.0
- SONAR_VERSION=7.0 SONAR_JAVA_VERSION=5.1.1.13214
# 7.3
- SONAR_VERSION=7.3 SONAR_JAVA_VERSION=5.6.1.15064
install:
# decrypt settings.xml, pubring.gpg and secring.gpg
- if [ -n "$encrypted_b6710039761a_key" ]; then openssl aes-256-cbc -K $encrypted_b6710039761a_key -iv $encrypted_b6710039761a_iv -in .travis/secrets.tar.enc -out .travis/secrets.tar -d; fi
- if [ -f ".travis/secrets.tar" ]; then tar -xvf .travis/secrets.tar -C .travis; fi
script:
- mvn verify -B -e -V -Dsonar.version=$SONAR_VERSION -Dsonar-java.version=$SONAR_JAVA_VERSION
jobs:
include:
- stage: analysis
if: ( type = pull_request and head_repo =~ ^spotbugs/ ) or ( type != pull_request and repo =~ ^spotbugs/ )
script:
- mvn org.jacoco:jacoco-maven-plugin:prepare-agent verify sonar:sonar -B -e -V -Dsonar.version=$SONAR_VERSION -Dsonar-java.version=$SONAR_JAVA_VERSION
notifications:
email: false
addons:
sonarcloud:
organization: "spotbugs"
token:
secure: "TO179WgRUyyT2Yg92FpC1r746GaHDMZ7+rMiBqnXztoj5VWTn8U0+M9edyxQ+cKZtCznC4JoimdjBhne52vauWFuQsoczrxtnN7l4w+yemC799Mm5jEuPKoId1CQZkVc5g4hmmeV4Qg6H5K1or1gnl+MGGZ9tbUYOu2v+G2SyAA="
github_token:
secure: "F37JqWPpdlOl4oHvTAap9uw+MEqmIz60HiVKYmSpQHDZRb13VJ/pVO11GVhoUfiswOERIEe6Ot/diH/ZK7qhaJQtPJVdSHLyN5t9KSdLtP9wYHWINVR79q8nM7I0rOZ94XDbBsHEsFgC/IWAYizVavQpMw5AGt31qjTzac19BVQ="
deploy:
# deploy SNAPSHOT artifact onto Sonatype Nexus
- provider: script
skip_cleanup: true
script: mvn deploy -B -P deploy -Dgpg.skip -s .travis/settings.xml
on:
branch: master
condition: "$SONAR_VERSION = '6.7'*"
# deploy STABLE artifact onto Sonatype Nexus
- provider: script
skip_cleanup: true
script: mvn deploy -B -P deploy -s .travis/settings.xml
on:
tags: true
condition: "$SONAR_VERSION = '6.7'*"