-
Notifications
You must be signed in to change notification settings - Fork 1
/
circle.yml
32 lines (27 loc) · 1.04 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
machine:
services:
- docker
dependencies:
override:
- docker info
- sudo pip install --upgrade docker-compose==1.2.0
- sudo pip install awscli
- docker build -t soutech/share_progress_stats_service:$CIRCLE_SHA1 .
test:
override:
# tests the built image
- envsubst '$CIRCLE_SHA1' <circle/docker-compose.yml >tmp && mv tmp circle/docker-compose.yml
- cat Dockerrun.aws.json.template | envsubst > Dockerrun.aws.json
- annotate-output docker-compose -f circle/docker-compose.yml run processor
database:
override:
- echo "look in circle/specs-and-rake-tasks for database setup for testing environment"
deployment:
production:
# push to Docker Hub and deploy new version on AWS
branch: master
commands:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker push soutech/share_progress_stats_service
# Environment name is not the same as for the Ruby worker because we can't change its type
- ./deploy.sh $CIRCLE_SHA1 'share_progress_stats' 'sp-worker-production'