-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
130 lines (125 loc) · 4.09 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
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
workspace:
base: /code
pipeline:
test:
image: node:14-alpine
environment:
- PORT=3000
- REDIS_URL=redis://127.0.0.1:6379
- ELASTIC_APM_SERVICE_NAME=nossas-org
- ELASTIC_APM_SERVER_URL=http://localhost:9200
- ELASTIC_APM_SECRET_TOKEN=1111
- ELASTIC_APM_ACTIVE=false
commands:
- apk --update add curl
- yarn
- yarn run lint
# - yarn run test
- yarn run build
publish-staging-build:
image: plugins/docker
repo: nossas/nossas-org
dockerfile: Dockerfile
secrets: [docker_username, docker_password]
environment:
- NEXT_PUBLIC_BONDE_API_GRAPHQL_URL=wss://api-graphql.staging.bonde.org/v1/graphql
- NEXT_PUBLIC_DONATION_EN_WIDGET_ID=66736
- NEXT_PUBLIC_DONATION_WIDGET_ID=24146
- NEXT_PUBLIC_INCUBATIONS_EN_WIDGET_ID=66734
- NEXT_PUBLIC_INCUBATIONS_WIDGET_ID=20292
- NEXT_PUBLIC_MATERIALS_EN_WIDGET_ID=66735
- NEXT_PUBLIC_MATERIALS_WIDGET_ID=20293
- NEXT_PUBLIC_NEWSLETTER_EN_WIDGET_ID=66737
- NEXT_PUBLIC_NEWSLETTER_WIDGET_ID=24147
- NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_Bhs5RG7HFGAGldrHmFWbNyBg00Q96hDiSN
- STRIPE_SECRET_KEY=sk_test_CtuwuQuiQDnlIznUUz5xSarM00EGzgLg2K
build_args_from_env:
- NEXT_PUBLIC_BONDE_API_GRAPHQL_URL
- NEXT_PUBLIC_DONATION_EN_WIDGET_ID
- NEXT_PUBLIC_DONATION_WIDGET_ID
- NEXT_PUBLIC_INCUBATIONS_EN_WIDGET_ID
- NEXT_PUBLIC_INCUBATIONS_WIDGET_ID
- NEXT_PUBLIC_MATERIALS_EN_WIDGET_ID
- NEXT_PUBLIC_MATERIALS_WIDGET_ID
- NEXT_PUBLIC_NEWSLETTER_EN_WIDGET_ID
- NEXT_PUBLIC_NEWSLETTER_WIDGET_ID
- NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY
group: builder
tags:
- ${DRONE_BRANCH/\//-}
when:
status: success
event: [push]
publish-production-build:
image: plugins/docker
repo: nossas/nossas-org
environment:
- NEXT_PUBLIC_BONDE_API_GRAPHQL_URL=wss://api-graphql.bonde.org/v1/graphql
- NEXT_PUBLIC_DONATION_EN_WIDGET_ID=68381
- NEXT_PUBLIC_DONATION_WIDGET_ID=67647
- NEXT_PUBLIC_INCUBATIONS_EN_WIDGET_ID=68382
- NEXT_PUBLIC_INCUBATIONS_WIDGET_ID=67644
- NEXT_PUBLIC_MATERIALS_EN_WIDGET_ID=68383
- NEXT_PUBLIC_MATERIALS_WIDGET_ID=67645
- NEXT_PUBLIC_NEWSLETTER_EN_WIDGET_ID=68380
- NEXT_PUBLIC_NEWSLETTER_WIDGET_ID=67646
- NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_live_e5CIIedRLyfjhiraTWEyQTic000aasOAst
- STRIPE_SECRET_KEY=sk_test_CtuwuQuiQDnlIznUUz5xSarM00EGzgLg2K
- NODE_ENV=production
build_args_from_env:
- NEXT_PUBLIC_BONDE_API_GRAPHQL_URL
- NEXT_PUBLIC_DONATION_EN_WIDGET_ID
- NEXT_PUBLIC_DONATION_WIDGET_ID
- NEXT_PUBLIC_INCUBATIONS_EN_WIDGET_ID
- NEXT_PUBLIC_INCUBATIONS_WIDGET_ID
- NEXT_PUBLIC_MATERIALS_EN_WIDGET_ID
- NEXT_PUBLIC_MATERIALS_WIDGET_ID
- NEXT_PUBLIC_NEWSLETTER_EN_WIDGET_ID
- NEXT_PUBLIC_NEWSLETTER_WIDGET_ID
- NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY
- NODE_ENV
dockerfile: Dockerfile
secrets: [docker_username, docker_password]
group: builder
tags:
- ${DRONE_TAG##v}
- latest
when:
status: success
event: [tag]
nossas-org-staging-deploy:
image: peloton/drone-rancher
url: http://cluster.bonde.org
service: webservers/nossas-org
group: deploying
docker_image: nossas/nossas-org:${DRONE_BRANCH/\//-}
timeout: 360
confirm: true
secrets: [rancher_access_key, rancher_secret_key]
when:
status: success
event: [push]
nossas-org-production-deploy:
image: peloton/drone-rancher
url: http://cluster.bonde.org
service: webservers/nossas-org
group: deploying
docker_image: "nossas/nossas-org:${DRONE_TAG##v}"
timeout: 360
confirm: true
secrets:
- source: rancher_access_key_prod
target: rancher_access_key
- source: rancher_secret_key_prod
target: rancher_secret_key
when:
status: success
event: [tag]
services:
database:
image: postgres:9
environment:
- POSTGRES_PASSWORD=postgres
- POSTGRES_HOST_AUTH_METHOD=trust
queue:
image: redis:3.2.4-alpine