forked from webkom/vote
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcircle.yml
39 lines (36 loc) · 1.06 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
machine:
node:
version: 8
services:
- docker
dependencies:
override:
- yarn
post:
- wget https://saucelabs.com/downloads/sc-4.4.11-linux.tar.gz
- tar -xzf sc-4.4.11-linux.tar.gz
- docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD -e webkom@abakus.no
test:
override:
- yarn lint
- yarn mocha
- yarn coverage
# Setup the SauceLabs bridge:
- cd sc-*-linux && ./bin/sc --user $SAUCE_USERNAME --api-key $SAUCE_ACCESS_KEY --readyfile ~/sauce_is_ready:
background: true
# Wait for tunnel to be ready:
- while [ ! -e ~/sauce_is_ready ]; do sleep 1; done
# Run the frontend tests:
- yarn protractor
post:
# Wait for Sauce Connect to close the tunnel:
- killall --wait sc
deployment:
production:
branch: master
commands:
- docker build -t vote:$CIRCLE_SHA1 .
- docker tag vote:$CIRCLE_SHA1 $EXTERNAL_REGISTRY:$CIRCLE_SHA1
- docker tag vote:$CIRCLE_SHA1 $EXTERNAL_REGISTRY:latest
- docker push $EXTERNAL_REGISTRY:$CIRCLE_SHA1
- docker push $EXTERNAL_REGISTRY:latest