forked from OpenNeuroOrg/openneuro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
58 lines (55 loc) · 2.25 KB
/
circle.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
machine:
node:
version: 8.2.0
services:
- docker
dependencies:
cache_directories:
- ~/.cache/yarn
- ~/.mongodb-binaries
dependencies:
override:
- yarn install
- yarn bootstrap
post: # You would think these are tests but this way the build stops if they fail
# Lint
- yarn lint
# Unit Tests
- yarn coverage -w 2
test:
override:
# Coverage
- yarn run codecov
deployment:
dev:
branch: master
commands:
- if [[ -n "$DOCKER_PASS" ]]; then docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS; fi
- docker build --pull -t openneuro/server packages/openneuro-server
- docker build --pull -t openneuro/app -f packages/openneuro-app/Dockerfile .
# Update latest tag
- docker tag -f openneuro/server openneuro/server:latest
- docker tag -f openneuro/app openneuro/app:latest
- if [[ -n "$DOCKER_PASS" ]]; then docker push openneuro/server; fi
- if [[ -n "$DOCKER_PASS" ]]; then docker push openneuro/app; fi
branches:
branch: /.*/
commands:
- if [[ -n "$DOCKER_PASS" ]]; then docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS; fi
- docker build --pull -t openneuro/server packages/openneuro-server
- docker build --pull -t openneuro/app -f packages/openneuro-app/Dockerfile .
# Update latest tag
- docker tag -f openneuro/server openneuro/server:${CIRCLE_BRANCH///}
- docker tag -f openneuro/app openneuro/app:${CIRCLE_BRANCH///}
- if [[ -n "$DOCKER_PASS" ]]; then docker push openneuro/server:${CIRCLE_BRANCH///}; fi
- if [[ -n "$DOCKER_PASS" ]]; then docker push openneuro/app:${CIRCLE_BRANCH///}; fi
production:
tag: /v.*/
commands:
- if [[ -n "$DOCKER_PASS" ]]; then docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS; fi
- docker build --pull -t openneuro/server packages/openneuro-server
- docker build --pull -t openneuro/app -f packages/openneuro-app/Dockerfile .
- docker tag openneuro/server openneuro/server:$CIRCLE_TAG
- docker tag openneuro/app openneuro/app:$CIRCLE_TAG
- if [[ -n "$DOCKER_PASS" ]]; then docker push openneuro/server:$CIRCLE_TAG; fi
- if [[ -n "$DOCKER_PASS" ]]; then docker push openneuro/app:$CIRCLE_TAG; fi