forked from beyondessential/tupaia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcodeship-services.yml
49 lines (45 loc) · 1.78 KB
/
codeship-services.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
# 'validation' service checks:
# - branch name
# - that there are no exclusive tests
# - TODO: strip this down to a tiny image that just checks branch name, and use eslint no-exclusive-tests flag
# at lint step after RN-201
validation:
build:
dockerfile: ./packages/devops/ci/tupaia-ci-cd.Dockerfile
cached: true
default_cache_branch: 'dev'
encrypted_dockercfg_path: ./packages/devops/ci/dockercfg.encrypted
testing:
build:
dockerfile: ./packages/devops/ci/tupaia-ci-cd.Dockerfile
cached: true
default_cache_branch: 'dev'
depends_on:
- db
encrypted_env_file: ./packages/devops/ci/testing.env.encrypted # test db env vars
encrypted_dockercfg_path: ./packages/devops/ci/dockercfg.encrypted
# 'e2e' service includes a base cypress container, plus code and node_module dependencies
# required by e2e tests in web-frontend
e2e:
build:
dockerfile: ./packages/devops/ci/e2e.Dockerfile
encrypted_env_file: ./packages/devops/ci/e2e.env.encrypted
cached: true
default_cache_branch: 'e2e'
encrypted_dockercfg_path: ./packages/devops/ci/dockercfg.encrypted
volumes:
# see https://docs.cloudbees.com/docs/cloudbees-codeship/latest/pro-continuous-integration/browser-testing#_chrome_crashing
- /dev/shm:/dev/shm
# 'db' service provides a postgres db with postgis
db:
image: postgis/postgis:13-3.2-alpine
encrypted_dockercfg_path: ./packages/devops/ci/dockercfg.encrypted
encrypted_env_file: ./packages/devops/ci/db.env.encrypted
# the 'deployment' service has the aws cli, and credentials for an IAM role to trigger the lambda
# script that redeploys tupaia
deployment:
build:
dockerfile: ./packages/devops/ci/deployment.Dockerfile
encrypted_env_file: ./packages/devops/ci/deployment.env.encrypted
environment:
- AWS_DEFAULT_REGION=ap-southeast-2