forked from reactioncommerce/reaction
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
44 lines (41 loc) · 1.59 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
machine:
node:
version: 0.10.46
services:
- docker
pre:
- meteor update || curl https://install.meteor.com | /bin/sh
dependencies:
cache_directories:
- "~/.meteor"
- "~/docker"
override:
- cd $HOME/reaction
- .reaction/scripts/clone-packages.sh
- .reaction/docker/scripts/plugin-loader.sh
- if [[ -e ~/docker/image.tar ]]; then docker load -i ~/docker/image.tar; fi
- docker build -t reactioncommerce/reaction:latest .
- mkdir -p ~/docker; docker save reactioncommerce/reaction:latest > ~/docker/image.tar
test:
override:
- cd $HOME/reaction
- meteor npm install
- SERVER_TEST_REPORTER="dot" meteor test --once --full-app --headless --driver-package dispatch:mocha
- docker-compose -f .reaction/docker/docker-compose.test.yml up -d; sleep 10
- curl --retry 10 --retry-delay 5 -v http://localhost
deployment:
prequel:
branch: development
commands:
- docker tag reactioncommerce/reaction:latest reactioncommerce/prequel:latest
- docker tag reactioncommerce/reaction:latest reactioncommerce/prequel:$CIRCLE_BUILD_NUM
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker push reactioncommerce/prequel:$CIRCLE_BUILD_NUM
- docker push reactioncommerce/prequel:latest
release:
branch: master
commands:
- docker tag reactioncommerce/reaction:latest reactioncommerce/reaction:$CIRCLE_BUILD_NUM
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker push reactioncommerce/reaction:$CIRCLE_BUILD_NUM
- docker push reactioncommerce/reaction:latest