This repository has been archived by the owner on Jun 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 57
/
Copy path.travis.yml
51 lines (45 loc) · 2.04 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
language: java
sudo: false
install: true
dist: trusty
jdk:
- oraclejdk8
services:
- docker
branches:
except:
- travis-pre-release
env:
global:
- GITHUB_TOKEN: &GITHUB_TOKEN
secure: "djo5iqoDyFU/Aa7hVrKPxuRJC/jwSZDll8KdJtaDN++VJ+iGLKBhSrJggUBXL54C7eCTjcodlSv+6K1owaflpqrfnJW3WkmmecHK0UTAT+ouYtyTHjIY7ltaBgM1pCrhGcqMgjYbPxJuxfl7lKP1ZiFRvA/kB0SoCvatfFtUxzI="
# If this was called SONAR_TOKEN, it would be used by the sonar scanner automatically. Unfortunately, that also goes for the end-to-end test where we do not want to use this token.
# Note for this reason we cannot use the sonarcloud addon either.
- SONAR_CLOUD_TOKEN:
secure: "OZAjVsFt2MICZns2lODx1O4306p9HtAk3Ojt3pxME6mMnRceVEIvMHaOzwzWYdidmwUKIWg7rFaMaPPkfJjW1bU8eDgWkqoBtikATOIlFoT+jI+5KHeujUj90ymqY4FAorTJpXLg4hpxmiqWYjNOy4rPh+/hu650yKKKZJ6P53c="
script:
# Run this first, because 'verify' builds the project and runs the auto-formatting.
# But we want to detect commits that don't adhere to the format. E.g. if someone
# makes last-minute code changes without rebuilding it locally (which would auto-format).
- mvn com.coveo:fmt-maven-plugin:check -B -e -V
- mvn verify -DbuildVersion=$TRAVIS_BUILD_NUMBER -B -e -V
- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then mvn sonar:sonar -Dsonar.branch.name=$TRAVIS_BRANCH -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=$SONAR_CLOUD_TOKEN -Dsonar.organization=adnovum -Dsonar.projectKey=adnovum_sonar-build-breaker -DbuildVersion=$TRAVIS_BUILD_NUMBER -B -e -V; fi'
- verification/test_e2e.sh 7.9-community 8-community-beta
before_deploy:
- .travis/prepare_pre_release.sh
deploy:
provider: releases
api_key: *GITHUB_TOKEN
file_glob: true
file: target/sonar-build-breaker-plugin-*.jar
skip_cleanup: true
prerelease: true
overwrite: true
name: Travis Pre-Release Build
body: Automatic pre-release build of $TRAVIS_BRANCH ($TRAVIS_COMMIT) built by Travis CI on $(date +'%F %T %Z').
on:
repo: adnovum/sonar-build-breaker
branch: master
cache:
directories:
- '$HOME/.m2/repository'