-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy path.travis.yml
61 lines (57 loc) · 5.2 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
language: java
# Ubuntu Xenial (https://docs.travis-ci.com/user/reference/xenial/)
dist: xenial
jdk: openjdk11
jobs:
include:
- stage: test
if: (NOT branch =~ /^release\/.*$/)
script: mvn --batch-mode test
after_success: mvn --batch-mode jacoco:report coveralls:report
- stage: release
if: (branch =~ /^release\/.*$/)
env:
- GIT_USERNAME=daniel-shuy
# GIT_PASSWORD
- secure: DGfQGdyii30XppqdTyLQCZgK2Uhy6FC3YUXBo0I3u1dfMApEjRIxQlZC1+uGn/sp9V5iSbNsWreh7FbMLGrEpG60l+vf/RFE5z29i8fbS6xq12X/JXTY7Bvu85Cgms0AXCFV5qELOh/ItBTY5Sn5dyB5oFazlOxSYNwDKxxcY7z83yHRrOn8BBXdZ6S0wAhqmGODFjWa6ryIhC+Tx5IzjAILPXs0Z5Zjr/kK6Zc9z5qlVg+FONBa0s6rr41g1skFGIaNSlGVFToaUAd0FyK0QZ6VKXhMOkOgmgBvGx+/wZfOEIVEeb+PMM4NHsGJLMD4Dc/TcY9vG0WcdHDQbnLDuNf5u/3h8iCBMQMce+HgT32b1AOVUN652f8fab8D3wkJD9kxBWk/y4CDWVDtN2R+lDRqAAAiVFaLEBHmFDijZo4OV9Tz7Bo8lnCcuKGy4lQHQ0nFjK/ZlgDyPNPAAZwSm8451g+MMOVZ2JRFXlMHeLftVUiNCNLkUD/DWfZTK/50YHDA3MmFwBSeZ/yoxhDPI1774b0FcOW6HnsPCurKYzvUI7muDAcGbZn0oayDsOflzDneAR9T4NLS7F+EwyAe+gxNf3Ba5618wkmn3h9mo/p3JRbM6bK0SL4Ci4mXnFD0qWhc/z+1QXRPpTS8EN3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NPrkmV6FyOAz8sg=
- GPG_PUBLIC_RING=$TRAVIS_BUILD_DIR/travis/pubring.gpg
- GPG_SECRET_RING=$TRAVIS_BUILD_DIR/travis/secring.gpg
# Extract release version from branch name
- RELEASE_VERSION=`echo $TRAVIS_BRANCH | sed --regexp-extended 's/^release\/(.*)$/\1/'`
- GIT_MERGE_AUTOEDIT=no
before_install:
# git-flow AVH (https://github.com/petervanderdoes/gitflow-avh/wiki/Installing-on-Linux,-Unix,-etc.#user-content-ubuntu)
- sudo add-apt-repository --yes ppa:pdoes/gitflow-avh
# use add-apt-repository --update in Ubuntu 17+ (Artful)
- sudo apt-get update
- sudo apt-get --yes install git-flow
# https://docs.travis-ci.com/user/encrypting-files/#encrypting-multiple-files
- openssl aes-256-cbc -K $encrypted_4c43ee4cec95_key -iv $encrypted_4c43ee4cec95_iv -in travis/secrets.tar.enc -out travis/secrets.tar -d
- tar xv -C travis -f travis/secrets.tar
- cp travis/settings.xml $HOME/.m2/settings.xml
install:
- git remote set-url origin https://$GIT_USERNAME:[email protected]/$TRAVIS_REPO_SLUG.git
- git remote set-branches --add origin master
- git remote set-branches --add origin develop
- git fetch origin
- git checkout --force -b master --track origin/master
- git checkout --force -b develop --track origin/develop
- git checkout --force $TRAVIS_BRANCH
- git config gitflow.prefix.release release/
- git flow init --defaults
script: mvn --batch-mode -DreleaseVersion=$RELEASE_VERSION release:prepare release:perform
after_success:
- mvn --batch-mode jacoco:report coveralls:report
# --message option is required to suppress editor prompt
- git flow release finish --showcommands --push --message 'Release' --notag
# Cache Maven dependencies (https://docs.travis-ci.com/user/caching/#arbitrary-directories)
cache:
directories:
- $HOME/.m2