-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
72 lines (62 loc) · 2.44 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
# Build script for Travis CI
#
# use xenial distribution
dist: xenial
# no need to check for oracle's java
language: java
jdk: openjdk8
# speed up builds by caching maven local repository
# we are also using python via conda/pip
cache:
directories:
- "$HOME/.m2/repository"
# as agreed in our SOP
branches:
only:
- master
- development
- /^hotfix\/.*$/
# Travis treats pushed tags as branches
- /^[vV]?\d+\.\d+\.\d+$/ # matches e.g., v1.2.3, 1.2.3, V1.2.3
# added to make logs look cleaner, crisper, certified fresh
before_install: unset _JAVA_OPTIONS
# check if we need to add a license file for Vaadin charts
before_script: if [ "$VAADIN_CHARTS_LICENSE_CODE" != "" ]; then
echo "$VAADIN_CHARTS_LICENSE_CODE" > ~/.vaadin.charts.developer.license;
fi;
# as agreed in our SOP, build everything (don't deploy, just try to 'mvn package' locally, which covers unit tests)
script: mvn --quiet --activate-profiles !development-build,!release-build --settings .travis.settings.xml clean cobertura:cobertura package
# upload code coverage report, generate maven site (javadocs, documentation, static code analysis, etc.)
after_success:
- bash <(curl -s https://codecov.io/bash)
# upload to maven
deploy:
# as agreed in our SOP, builds on development branch will deploy to our maven repository after validating
# the artifact has a proper SNAPSHOT version
# make sure to skip integration tests! (using -DskipITs)
- skip_cleanup: true
provider: script
script: mvn --quiet --activate-profiles development-build,!release-build --settings .travis.settings.xml deploy -DskipITs
on:
branch: development
condition: '"$TRAVIS_EVENT_TYPE" = "push"'
# as agreed in our SOP, releases are performed by tagging commits,
# the version string and version of dependencies are validated (no snapshots allowed)
- skip_cleanup: true
provider: script
script: mvn --quiet --activate-profiles !development-build,release-build --settings .travis.settings.xml deploy -DskipITs
on:
condition: '"$TRAVIS_EVENT_TYPE" = "push"'
tags: true
# change according to your needs, but we recommend to deactivate email notifications
# for now, we configured Travis to send a notification to the #travis-ci Slack channel
notifications:
email:
on_success: never
on_failure: never
slack:
on_success: never
on_failure: always
# edit the following section if you want to get slack notifications
rooms:
- secure: "***"