-
Notifications
You must be signed in to change notification settings - Fork 109
/
Copy path.travis.yml
108 lines (88 loc) · 4.66 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
language: java
dist: trusty
env:
global:
- CODECOV_TOKEN="b5659ea0-f191-4e1d-9139-a8a31971c386"
install: true
stages:
- name: test
if: type = pull_request OR type = api OR (branch = master AND type = push)
# - name: deploy only
# if: branch = master AND type = push
- name: tag and deploy
if: type = api
jobs:
include:
- stage: test
name: "Unit Tests"
jdk: oraclejdk11
install: &build_no_checks
- mvn install -Dsilent=true -DskipTests=true -Dmaven.javadoc.skip=true -Dchecksyle.skip=true -Dspotbugs.skip=true -Djacoco.skip=true -B dependency:go-offline
script: &build_with_unittests
- mvn install -pl \!tests/acceptance-test -P reduce-logging -o || travis_terminate 1
- name: "Gradle Build"
jdk: oraclejdk11
script:
- ./gradlew build || travis_terminate 1
- name: "Acceptance Tests"
jdk: oraclejdk11
install: *build_no_checks
script: mvn verify -pl tests/acceptance-test -P reduce-logging -o || travis_terminate 1
- name: "Vault Acceptance Tests"
jdk: oraclejdk11
before_install: &install_hashicorp
- wget https://releases.hashicorp.com/vault/1.2.2/vault_1.2.2_linux_amd64.zip -O /tmp/vault_1.2.2_linux_amd64.zip
- mkdir -p vault/bin && pushd $_
- unzip /tmp/vault_1.2.2_linux_amd64.zip
- export PATH=$PATH:$PWD && popd
install: *build_no_checks
script: mvn verify -pl tests/acceptance-test -P vault-acceptance-tests,reduce-logging -o || travis_terminate 1
# - stage: deploy only
# name: "Deploy to OSSRH"
# jdk: oraclejdk8
# script:
# - echo $GPG_SECRET_KEYS | base64 --decode | gpg --import
# - echo $GPG_OWNERTRUST | base64 --decode | gpg --import-ownertrust
# - travis_wait 60 mvn deploy --settings .maven.xml -B -P release,reduce-logging -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -Djavadoc.skip=true || travis_terminate 1
- stage: tag and deploy
name: "Tag on GitHub and deploy to OSSRH"
jdk: oraclejdk11
script:
- head_ref=$(git rev-parse HEAD) || travis_terminate 1
- branch_ref=$(git rev-parse "$TRAVIS_BRANCH") || travis_terminate 1
- |
if [[ $head_ref != $branch_ref ]]; then
echo "HEAD ref ($head_ref) does not match $TRAVIS_BRANCH ref ($branch_ref). New commits may have been pushed before the build cloned the repo"
return 0
fi
- git checkout $TRAVIS_BRANCH || travis_terminate 1
- release_version=`mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec`
- branch_name="release-${release_version}"
# prepare current branch for release, create release branch, increment development version on current branch
- mvn --settings .maven.xml -B -DbranchName=${branch_name} release:branch || travis_terminate 1
- git checkout $branch_name || travis_terminate 1
# remove SNAPSHOT version suffix, create a tag in GitHub, increment development version on release branch
- mvn --settings .maven.xml -B -DpushChanges=true release:prepare || travis_terminate 1
# check out tag from GitHub, build then deploy to OSSRH
- echo $GPG_SECRET_KEYS | base64 --decode | gpg --import
- echo $GPG_OWNERTRUST | base64 --decode | gpg --import-ownertrust
- mvn --settings .maven.xml -B release:perform || travis_terminate 1
# - if: branch = travis_changes AND type = push
# name: "Deploy site"
# jdk: oraclejdk8
# before_install:
# - echo -e "machine github.com\n login $CI_USER_TOKEN" > ~/.netrc
# script:
# - mvn site-deploy
# install: echo "install"
sudo: enabled
notifications:
slack:
secure: TeWK06kSrpdvMY/TNocbNYy0gJ9+jP9ygjzBtgsMRmm0kbBpzg34eZJyWMU/sf5x6taWAVOGW1jfG4+kfLUqG7CrqcRUihqK3x1DOJQS/BlT2IhJkED4dtwEw7xTkRTxPkghwMAXjJZImnh7ORS1HCJByEs5kedThh/Vr1HDaWJ+KctGLhE3LudyYikxZEWYVbexHZ5o8QbFGwmTYNHLaKAIGZbvt8wDoE+yJOftCqmCh2aJ4YBzYSW9wmxxf3tu75Azni9Am1wiCu+Q5NhljtZwbx6QopkHxbM0DdohOwQQ1g2lPni8dZYdw/obvVQOKLNjkTWU3LvtiWrwiAKp/w5czeL5nkQiFxcAcyTqCRXNh3J1RD1k9H4OBLo2N+5o6dhnNUZt24PZFsNMzR+ygmNq7WvAqQpC5ixppND//8tg25234dXafdL8KmWMFuTepQem2H9Yo8zr16v+VC7MEUyh5ta67xqhFGluIDEySgxMX389r0bU1dXsqhc/K131ty6AcV8FWEGToguvxL+Sj8RhBk5F2B+QOtUzl/5iqlGhqpWcVkoQjiCPJbcLHlHbt6fiUNEpVVjxa2kNrTNZ/5GS6eZoVr5OT1tc3lY5ZUA40yk0Pk63mYB30yMl/wtbbQl/g/0OpcJW20+ZT3971dIt6PMFg3b+n1xSZgTNvIY=
before_cache:
- mvn dependency:purge-local-repository -Dinclude=com.jpmorgan.quorum -DresolutionFuzziness=groupId -Dverbose=true -DreResolve=false
cache:
directories:
- "$HOME/.m2"
after_success:
- bash <(curl -s https://codecov.io/bash)