forked from CheesecakeLabs/react-redux-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
38 lines (34 loc) · 1.1 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
machine:
node:
version: 6
services:
- docker
dependencies:
override:
- yarn
cache_directories:
- ~/.cache/yarn
test:
pre:
- yarn lint
override:
- JEST_JUNIT_OUTPUT="$CIRCLE_TEST_REPORTS/junit.xml" yarn jest -- -w 1 --testResultsProcessor jest-junit
deployment:
production:
tag: /v[0-9]+(\.[0-9]+)*(-\w+)?/
commands:
- eval $(aws ecr get-login --region $AWS_REGION | sed 's|https://||')
- docker build -t $DOCKER_TAG --rm=false .
- docker tag $DOCKER_TAG:latest $AWS_SERVER:$CIRCLE_TAG
- docker push $AWS_SERVER:$CIRCLE_TAG
- pip install ecs-deploy
- ecs deploy $AWS_CLUSTER $AWS_SERVICE -t $CIRCLE_TAG --timeout $AWS_ECS_TIMEOUT
development:
branch: staging
commands:
- eval $(aws ecr get-login --region $AWS_REGION | sed 's|https://||')
- docker build -t $DOCKER_TAG --rm=false .
- docker tag $DOCKER_TAG:latest $AWS_SERVER:$AWS_TAG_DEV
- docker push $AWS_SERVER:$AWS_TAG_DEV
- pip install ecs-deploy
- ecs deploy $AWS_CLUSTER $AWS_SERVICE_STAGING -t $AWS_TAG_DEV --timeout $AWS_ECS_TIMEOUT