This repository has been archived by the owner on Nov 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.travis.yml
83 lines (70 loc) · 2.16 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
sudo: required
services:
- docker
env:
- DOCKER_COMPOSE_VERSION=1.22.0
before_install:
# install newer docker
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- sudo apt-get update
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
# install newer docker-compose
- sudo rm /usr/local/bin/docker-compose
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
before_script:
- source scripts/set_env.sh
script:
- docker-compose up --build -d
after_success:
- docker save -o blockon_express.tar blockon_express
- docker save -o blockon_nginx.tar blockon_nginx
after_script:
- docker-compose down
before_deploy:
- zip -r latest.zip blockon-backend blockon-frontend/build blockon_express.tar blockon_nginx.tar scripts docker-compose.yaml appspec.yml
- mkdir -p deploy
- mv latest.zip deploy
deploy:
- provider: s3
access_key_id: $AWS_ACCESS_KEY
secret_access_key: $AWS_SECRET_KEY
bucket: blockon.house
region: ap-northeast-2
skip_cleanup: true
local_dir: deploy
on: &1
repo: team-blockon/blockon
branch: release
- provider: codedeploy
access_key_id: $AWS_ACCESS_KEY
secret_access_key: $AWS_SECRET_KEY
bucket: blockon.house
region: ap-northeast-2
key: latest.zip
bundle_type: zip
application: blockon
deployment_group: blockon
on: *1
- provider: s3
access_key_id: $DEV_AWS_ACCESS_KEY
secret_access_key: $DEV_AWS_SECRET_KEY
bucket: dev.blockon.house
region: ap-northeast-2
skip_cleanup: true
local_dir: deploy
on: &2
repo: team-blockon/blockon
branch: master
- provider: codedeploy
access_key_id: $DEV_AWS_ACCESS_KEY
secret_access_key: $DEV_AWS_SECRET_KEY
bucket: dev.blockon.house
region: ap-northeast-2
key: latest.zip
bundle_type: zip
application: blockon
deployment_group: blockon
on: *2