forked from beyondessential/tupaia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcodeship-services.yml
56 lines (51 loc) · 2.08 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
50
51
52
53
54
55
56
# In setting up these services, I have tried to minimise how much is loaded into each container for
# each step in order to speed up those individual step build + run times
# - 'validation' service includes a nodejs container, plus the full repo code, and any node_modules
# dependencies for the package in question
# - 'testing' service is the same as the validation service, but additionally depends on the db
# service (see below)
# - 'cypress' service includes a base cypress container, plus code and node_module dependencies
# required by e2e tests in web-frontend
# - the db service provides a postgres db with postgis (and takes a little while to run, thus the
# splitting of the above services so validation isn't slower than it should be)
# - the deployment service just uses the base alpine image + ssh to log into
# an ec2 instance and deploy the latest version of the code for each package
validation:
build:
dockerfile: full-testable-package.Dockerfile
cached: true
encrypted_dockercfg_path: dockercfg.encrypted
default_cache_branch: 'dev'
testing:
build:
dockerfile: full-testable-package.Dockerfile
depends_on:
- db
encrypted_env_file: ./ci-env-vars.encrypted # all individual .env files combined and encrypted
cached: true
encrypted_dockercfg_path: dockercfg.encrypted
default_cache_branch: 'dev'
e2e:
build:
dockerfile: e2e.Dockerfile
encrypted_env_file: ./ci-env-vars.encrypted
cached: true
encrypted_dockercfg_path: dockercfg.encrypted
default_cache_branch: 'e2e'
volumes:
# see https://docs.cloudbees.com/docs/cloudbees-codeship/latest/pro-continuous-integration/browser-testing#_chrome_crashing
- /dev/shm:/dev/shm
db:
image: mdillon/postgis:10-alpine
cached: true
encrypted_dockercfg_path: dockercfg.encrypted
deployment:
build:
dockerfile: deploy-only.Dockerfile
encrypted_env_file: ./ci-env-vars.encrypted
volumes:
# mapping to `.ssh` directory ensures that `id_rsa` file persists to subsequent steps
- ./.ssh:/root/.ssh
cached: true
encrypted_dockercfg_path: dockercfg.encrypted
default_cache_branch: 'dev'