forked from soufee/kappers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
68 lines (59 loc) · 1.65 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
os: linux
dist: xenial
language: java
jdk:
- openjdk8
install: true
before_install:
- chmod +x mvnw
# Improve Build Speed https://dzone.com/articles/travis-ci-tutorial-java-projects
cache:
directories:
- $HOME/.m2
addons:
postgresql: "10"
apt:
packages:
- postgresql-10
- postgresql-client-10
services:
- postgresql
- docker
before_script:
- psql -c 'create database testdb;' -U postgres
script:
- "./mvnw clean install -B
-Dspring.datasource.password=
-Dspring.jpa.show-sql=false
-Dlogging.level.org.flywaydb=warn
-Dlogging.level.org.springframework=warn
-Dlogging.level.org.springframework.test.context.cache=warn
-Dlogging.level.com.github.springtestdbunit=warn
-Dlogging.level.org.dbunit.operation=warn
-Dlogging.level.org.hibernate.sql=error
-Dlogging.level.org.hibernate.type.descriptor.sql.BasicBinder=error
-Dlogging.level.org.hibernate.type.EnumType=error"
- docker build -t rsuleymanov/kappers:latest .
after_success:
- bash <(curl -s https://codecov.io/bash)
before_deploy:
- zip -ur kappers target/kappers.war Procfile .ebextensions
# - docker login -u "$DOCKER_REGISTRY_USER" -p "$DOCKER_REGISTRY_PASS"
deploy:
- provider: elasticbeanstalk
access_key_id: $AWS_ACCESS_KEY
secret_access_key: $AWS_SECRET_KEY
region: "eu-west-2"
app: "Kappers"
env: "Version-A"
bucket_name: "kappers.dev"
skip_cleanup: true
zip_file: kappers.zip
on:
branch: "master"
# branch: "feature/deploy-to-aws"
# - provider: script
# script: docker push rsuleymanov/kappers:latest
# on:
# branch: master
# branch: feature/travis-ci-with-docker