-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcircle.yml
36 lines (33 loc) · 1.63 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
machine:
node:
version: 4.3.0
services:
- docker
dependencies:
pre:
- docker build -t poldracklab/$CIRCLE_PROJECT_REPONAME:$([ "$CIRCLE_BRANCH" != master ] && echo "$CIRCLE_BRANCH-" || echo "")$(node -p -e "require('./package.json').version") .
test:
override:
# Lint
- docker run poldracklab/$CIRCLE_PROJECT_REPONAME:$([ "$CIRCLE_BRANCH" != master ] && echo "$CIRCLE_BRANCH-" || echo "")$(node -p -e "require('./package.json').version") npm run lint
# Unit Tests
- docker run poldracklab/$CIRCLE_PROJECT_REPONAME:$([ "$CIRCLE_BRANCH" != master ] && echo "$CIRCLE_BRANCH-" || echo "")$(node -p -e "require('./package.json').version") npm run test
deployment:
aws:
branch: aws
commands:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker tag poldracklab/$CIRCLE_PROJECT_REPONAME:aws-$(node -p -e "require('./package.json').version") poldracklab/$CIRCLE_PROJECT_REPONAME:aws-latest
- docker push poldracklab/$CIRCLE_PROJECT_REPONAME
development:
branch: dev
commands:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker tag poldracklab/$CIRCLE_PROJECT_REPONAME:dev-$(node -p -e "require('./package.json').version") poldracklab/$CIRCLE_PROJECT_REPONAME:dev-latest
- docker push poldracklab/$CIRCLE_PROJECT_REPONAME
production:
branch: master
commands:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker tag poldracklab/$CIRCLE_PROJECT_REPONAME:$(node -p -e "require('./package.json').version") poldracklab/$CIRCLE_PROJECT_REPONAME:latest
- docker push poldracklab/$CIRCLE_PROJECT_REPONAME