-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcircle.yml
48 lines (48 loc) · 1.92 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
machine:
pre:
- sudo curl -L -o /usr/bin/docker 'http://s3-external-1.amazonaws.com/circle-downloads/docker-1.9.1-circleci-cp-workaround'; sudo chmod 0755 /usr/bin/docker; true;
services:
- docker
node:
version: 4
checkout:
post:
- git fetch --unshallow 2>/dev/null || true
- git fetch --tags
# Nasty hack: Because we get a freshly restored repo, timestamps do not
# correspond any more to when the file was last changed. To rectify this,
# first set everything to a timestamp in the past and then update the
# timestamp for all git-tracked files based on their last committed change.
- echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc
- find . -exec touch -t 201401010000 {} \;
- for x in $(git ls-tree --full-tree --name-only -r HEAD); do touch -t $(date -d "$(git log -1 --format=%ci "${x}")" +%y%m%d%H%M.%S) "${x}"; done
dependencies:
override:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker pull hoist/connector-slack:${CIRCLE_BRANCH//feature\//}; true;
- docker build -t hoist/connector-slack:${CIRCLE_BRANCH//feature\//} .
test:
override:
- docker kill mongodb; true;
- docker rm mongodb; true;
- docker kill hoist-connector-slack-test; true;
- docker rm hoist-connector-slack-test; true;
- docker run -d --name mongodb mongo:3.0.5
- docker run -t --link mongodb:db --name hoist-connector-slack-test --entrypoint gulp hoist/connector-slack:${CIRCLE_BRANCH//feature\//} test
post:
- docker cp hoist-connector-slack-test:/usr/src/app/coverage ~/
general:
artifacts:
- ~/coverage/*
- ~/coverage/**/*
- log/*.log
- npm-debug.log
deployment:
master:
branch: [master,/feature\/.*/]
owner: hoist
commands:
- docker push hoist/connector-slack:${CIRCLE_BRANCH//feature\//}
notify:
webhooks:
- url: https://overlord.hoist.io/api/webhook/circleci?api_token=xc1zrzacmxp9samlj9nya4gzay