-
Notifications
You must be signed in to change notification settings - Fork 16
/
.drone.yml
79 lines (67 loc) · 1.66 KB
/
.drone.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
---
kind: pipeline
type: docker
name: test
steps:
- name: build
image: karrug/dsin100dayscicd:0.3
commands:
- pwd
- df -h
- /root/env/bin/python tools/buildhtmlpages.py
trigger:
event:
- pull_request
---
kind: pipeline
type: docker
name: stage
steps:
- name: build
image: karrug/dsin100dayscicd:0.3
commands:
- pwd
- df -h
- /root/env/bin/python tools/buildhtmlpages.py
- name: deploy
image: karrug/dsin100dayscicd:0.3
environment:
AWS_ACCESS_KEY_ID:
from_secret: AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY:
from_secret: AWS_SECRET_ACCESS_KEY
commands:
- AWS_ACCESS_KEY_ID=$${AWS_ACCESS_KEY_ID} AWS_SECRET_ACCESS_KEY=$${AWS_SECRET_ACCESS_KEY} /root/env/bin/aws s3 sync --acl public-read content s3://refactoredstage/dsin100days/content
- /root/env/bin/aws s3 sync --acl public-read micro_courses s3://refactoredstage/dsin100days/micro_courses
trigger:
branch:
- develop
event:
- push
---
kind: pipeline
type: docker
name: live
steps:
- name: build
image: karrug/dsin100dayscicd:0.3
commands:
- ip addr
- whoami
- pwd
- /root/env/bin/python tools/buildhtmlpages.py
- name: deploy
image: karrug/dsin100dayscicd:0.3
environment:
AWS_ACCESS_KEY_ID:
from_secret: AWS_ACCESS_KEY_ID_LIVE
AWS_SECRET_ACCESS_KEY:
from_secret: AWS_SECRET_ACCESS_KEY_LIVE
commands:
- AWS_ACCESS_KEY_ID=$${AWS_ACCESS_KEY_ID} AWS_SECRET_ACCESS_KEY=$${AWS_SECRET_ACCESS_KEY} /root/env/bin/aws s3 sync --acl public-read content s3://refactored/dsin100days/content
- /root/env/bin/aws s3 sync --acl public-read micro_courses s3://refactored/dsin100days/micro_courses
trigger:
branch:
- master
event:
- push