forked from conduktor/kafka-security-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
63 lines (54 loc) · 1.79 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
language: scala
sudo: required
jdk: oraclejdk8
services:
- docker
scala:
- 2.12.4
before_install:
- if [ $TRAVIS_PULL_REQUEST = 'false' ]; then openssl aes-256-cbc -K $encrypted_575a6d494c46_key
-iv $encrypted_575a6d494c46_iv -in travis/secrets.tar.enc -out travis/secrets.tar
-d; tar xv -C travis -f travis/secrets.tar; fi
script:
- ./test.sh
after_success:
# send every push to master to sonatype
- if [ -z "$TRAVIS_PULL_REQUEST_BRANCH" ] && [ "$TRAVIS_BRANCH" = "master" ]; then { sbt publishSigned ;} fi;
# send releases / tags to maven central
- if [ -z "$TRAVIS_PULL_REQUEST_BRANCH" ] && [ -n "$TRAVIS_TAG" ]; then { sbt publishSigned && sbt sonatypeRelease ; } fi;
before_deploy:
# create release zip
- if [ -z "$TRAVIS_PULL_REQUEST_BRANCH" ] && [ -n "$TRAVIS_TAG" ]; then { sbt universal:packageBin ; } fi;
# Improvement: move logic out of docker_push.sh into .travis.yml
deploy:
- provider: script
script: bash docker_push.sh
skip_cleanup: true
on:
tags: true
condition: -z "$TRAVIS_PULL_REQUEST_BRANCH"
- provider: script
script: bash docker_push.sh
skip_cleanup: true
on:
branch: master
condition: -z "$TRAVIS_PULL_REQUEST_BRANCH"
# tags: true / false => has precendence over the branch condition
# condition: "foo == bar && baz==bat"
# repo: simplesteph/kafka-security-manager
- provider: releases
api_key: "$GITHUB_OAUTH_TOKEN"
file_glob: true
file: "target/universal/kafka-security-manager-*.zip"
skip_cleanup: true
on:
tags: true
condition: -z "$TRAVIS_PULL_REQUEST_BRANCH"
before_cache:
# Tricks to avoid unnecessary cache updates
- find $HOME/.sbt -name "*.lock" | xargs rm
- find $HOME/.ivy2 -name "ivydata-*.properties" | xargs rm
cache:
directories:
- $HOME/.ivy2/cache
- $HOME/.sbt