This repository has been archived by the owner on Mar 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
/
circle.yml
49 lines (45 loc) · 2.03 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
machine:
pre:
# Update docker version
- curl -sSL https://s3.amazonaws.com/circle-downloads/install-circleci-docker.sh | bash -s -- 1.10.0
services:
- docker
dependencies:
override:
- docker info
# our circle setup uses compose - install it
- sudo pip install --upgrade docker-compose==1.2.0
# install AWS CLI
- sudo pip install awscli
# build the image
- docker build -t soutech/champaign_web:$CIRCLE_SHA1 --build-arg CUSTOM_ASSETS_URL=$CUSTOM_ASSETS_URL --build-arg CUSTOM_ASSETS_CREDENTIALS=$CUSTOM_ASSETS_CREDENTIALS --build-arg CUSTOM_ASSETS_BRANCH=$CIRCLE_BRANCH .
test:
override:
# tests the built image
- cat circle/docker-compose-template.yml | envsubst > circle/docker-compose.yml
- cat circle/test.template.env | envsubst > circle/test.env
- cat Dockerrun.aws.json.template | envsubst > Dockerrun.aws.json
- annotate-output docker-compose -f circle/docker-compose.yml run web
database:
override:
- echo "look in circle/specs-and-rake-tasks for database setup for testing environment"
deployment:
production:
branch: master
commands:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker push soutech/champaign_web
- ./deploy.sh $CIRCLE_SHA1 'champaign' 'env-production' 'champaign-assets-production' 'logs3.papertrailapp.com:44107' 'actions.sumofus.org'
staging:
branch: external-assets
commands:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker push soutech/champaign_web
- ./deploy.sh $CIRCLE_SHA1 'champaign' 'champaign-staging' 'champaign-assets-staging' 'logs3.papertrailapp.com:34848' 'action-staging.sumofus.org'
testing:
# Change the branch value to your branch name to push up your branch to the testing server automatically.
branch: usersnap
commands:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker push soutech/champaign_web
- ./deploy_testing.sh $CIRCLE_SHA1 'champaign' 'champaign-testing' 'champaign-assets-testing'