-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
133 lines (133 loc) · 3.87 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
matrix:
fast_finish: true
allow_failures:
- language: python
if: branch = master
dist: xenial
python:
- "3.7"
env:
-DJANGO=2.2.1
install:
- cd practice-app
- pip install -r requirements.txt
deploy:
- provider: s3
access_key_id: $PRACTICE_APP_AWS_ACCESS_KEY
secret_access_key: $PRACTICE_APP_AWS_SECRET_KEY
local_dir: dpl_cd_upload
skip_cleanup: true
on: &2
repo: bounswe/bounswe2019group9
branch: master
bucket: bounswe-ass7-bucket
region: eu-central-1
- provider: codedeploy
access_key_id: $PRACTICE_APP_AWS_ACCESS_KEY
secret_access_key: $PRACTICE_APP_AWS_SECRET_KEY
bucket: bounswe-ass7-bucket
key: latest.zip
bundle_type: zip
application: bounsweAss7API
deployment_group: bounsweAss7APIDeploymentGroup
region: eu-central-1
on: *2
script:
- zip -r latest *
- mkdir -p dpl_cd_upload
- mv latest.zip dpl_cd_upload/latest.zip
- python manage.py test
include:
- language: java
if: branch = master
dist: xenial
jdk: openjdk8
install:
- cd backend
- ./server-conf/prepare-build.sh
- ./mvnw install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
script:
- ./mvnw clean install -B
- mv target/language-learning-platform-*.jar language-learning-platform.jar
- mv server-conf/appspec.yml appspec.yml
- mv server-conf/spring-boot-ec2.conf spring-boot-ec2.conf
- zip -r latest appspec.yml language-learning-platform.jar spring-boot-ec2.conf server-conf
- mkdir -p dpl_cd_upload
- mv latest.zip dpl_cd_upload/latest.zip
deploy:
- provider: s3
access_key_id: $BACKEND_AWS_ACCESS_KEY
secret_access_key: $BACKEND_AWS_SECRET_KEY
local_dir: dpl_cd_upload
skip_cleanup: true
on: &2
repo: bounswe/bounswe2019group9
branch: master
bucket: bounswe-backend-bucket
region: eu-central-1
- provider: codedeploy
access_key_id: $BACKEND_AWS_ACCESS_KEY
secret_access_key: $BACKEND_AWS_SECRET_KEY
bucket: bounswe-backend-bucket
key: latest.zip
bundle_type: zip
application: bounsweBackend
deployment_group: bounsweBackendDeploymentGroup
region: eu-central-1
on: *2
- language: node_js
if: branch = master
dist: xenial
node_js:
- "10"
cache:
yarn: true
directories:
- node_modules
before_install:
- cd frontend
script:
- yarn test
- CI=false yarn build
deploy:
- provider: s3
access_key_id: $FRONTEND_AWS_ACCESS_KEY
secret_access_key: $FRONTEND_AWS_SECRET_KEY
local_dir: build
skip_cleanup: true
acl: public_read
on: &2
repo: bounswe/bounswe2019group9
branch: master
bucket: bounswe2019group9.tk
region: eu-central-1
- language: node_js
if: branch = frontend
dist: xenial
node_js:
- "10"
cache:
yarn: true
directories:
- node_modules
before_install:
- cd frontend
script:
- yarn test
- CI=false yarn build
deploy:
- provider: s3
access_key_id: $FRONTEND_AWS_ACCESS_KEY
secret_access_key: $FRONTEND_AWS_SECRET_KEY
local_dir: build
skip_cleanup: true
acl: public_read
on: &2
repo: bounswe/bounswe2019group9
branch: frontend
bucket: next.bounswe2019group9.tk
region: eu-central-1
branches:
only:
- master
- frontend