-
Notifications
You must be signed in to change notification settings - Fork 1
/
circle.yml
35 lines (32 loc) · 1.14 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
machine:
services:
- docker
# Replace the Dockerfile with a staging version
checkout:
post:
- mv Dockerfile.test Dockerfile
dependencies:
cache_directories:
- "client/app/bower_components"
- "client/node_modules"
- "~/docker"
override:
- if [[ -e ~/docker/instanews.tar ]]; then docker load -i ~/docker/instanews.tar; fi
- docker build -t instanews .
- mkdir -p ~/docker; docker save instanews > ~/docker/instanews.tar
- docker run --name mongo -d mongo
- docker run --name redis -d redis
- npm install -g grunt-cli
- cd client && bower install && npm install && cd ..
test:
override:
- cd client && grunt karma && cd ..
- docker run --link "redis:redis" --link "mongo:mongodb" -e "AUTOUPDATE_DB=true" instanews
#- docker run -t instanews
#- docker run -e "NODE_ENV=staging" -e "ENCRYPT_PASSWORD=couchesareabit2fly4me" -t instanews /bin/bash -c "npm install && npm install -g grunt-cli && grunt coverage"
#deployment:
# staging:
# Run for all branches that start with 'staging'
# branch: /staging*/
# commands:
# - ./hello_world.sh