forked from s12v/sns
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
85 lines (73 loc) · 2.42 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
sudo: required
language: scala
scala:
- 2.12.4
jdk:
- oraclejdk8
env:
global:
- ENDPOINT=http://localhost:9911/
- AWS_ACCESS_KEY_ID=foo
- AWS_SECRET_ACCESS_KEY=bar
cache:
bundler: true
directories:
- $HOME/.ivy2/cache
- $HOME/.sbt/boot/
- $HOME/docker
services:
- docker
install:
- sbt clean update
- bundle install
- docker run -d -p 9324:9324 s12v/elasticmq
- docker run -it -v "$PWD":/tmp -w /tmp composer/composer:1-alpine install
script:
- sbt coverage test coverageReport
- sbt assembly
- JAR=$(ls target/scala-2.12/sns-*.jar | tail -1)
- java -jar "$JAR" > log.txt &
- >
bash <(curl -s https://raw.githubusercontent.com/s12v/wait4port/master/wait4port.sh)
http://localhost:9911
http://localhost:9324
- bundle exec cucumber
- >
docker run -it
-e ENDPOINT="$ENDPOINT"
-e AWS_ACCESS_KEY_ID="$AWS_ACCESS_KEY_ID"
-e AWS_SECRET_ACCESS_KEY="$AWS_SECRET_ACCESS_KEY"
-v "$PWD":/tmp -w /tmp --net=host php:7-alpine
bin/behat
- |
if [ "$TRAVIS_BRANCH" = "master" ]; then
TAG=latest
else
TAG="$TRAVIS_BRANCH"
fi
docker build --build-arg JAR="$JAR" -t "$TRAVIS_REPO_SLUG:$TAG" .
after_failure:
- cat log.txt
- cat db.json
after_success:
- bash <(curl -s https://codecov.io/bash)
before_deploy:
- docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"
deploy:
- provider: releases
api_key:
secure: BP0KLrv5A6jqO+RKm0wiRTlCg2xOekd7bRG5oPagIVp7tHvzHRIP2/qI79DOGy0rBfNY6K5WmLVfcih/jepsQPSTSmxiTV7H5adA/BgSfTZnLSQidS3xgujK3ARaFOhbtpTXFUgBpAjNjrafEGimo9FCEjM1yuvvlyLUnnvVfNor+nbkueIgC6IIcLfcMzzqGK5F3tCfd96O1FijD7EO6qOFo8zqk/DQT7VccWWwNnBPxYAj0RmzvmVxUA5byAY1tvr508l1aB2i3uHM7Wzx9kt9F45y/gOMQmX2QZf+s6h3c7AsMucxUBiV4je+2ybSRyLEvLg042MXBTBMoxAqX0y1Ehq643jinRYOd/DVt+HAEaWzmga5wlAzhWchPBeDVevykVGEhn5Ons/s64xvaPeLtjXfDokm23lFbhvWN9phE0bgT/mqDJ3Z2nFalWJ6crjbc8g8dci09VO2uFIkCfEi5F1awMFMnRBrj3ZanN4S2H6Eoyo1yOY8iNfqX7KcIqJX198uWPwot5FSgYp++C1ZdauTBueWMNTPt8W0vSocUHNwwbAL/IoKhOOMzkNbDXwKCU+TWyFznNlF7nTAm/bTANoZdpFWr6yQu8drOSVfNbJwRxQFO4wGBVnB6bRqDxT3BUn8xzaZFLlqfwUzmUlKjHWnzQg+xVazDMlW0IM=
file: "$(ls $TRAVIS_BUILD_DIR/target/scala-2.12/sns-*.jar | tail -1)"
skip_cleanup: true
on:
tags: true
- provider: script
script: docker push $TRAVIS_REPO_SLUG
skip_cleanup: true
on:
tags: true
- provider: script
script: docker push $TRAVIS_REPO_SLUG
skip_cleanup: true
on:
branch: master