This repository has been archived by the owner on Jul 2, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
50 lines (50 loc) · 3.12 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
50
machine:
pre:
- echo 'DOCKER_OPTS="-s btrfs -e lxc -D --userland-proxy=false"' | sudo tee -a /etc/default/docker
- sudo curl -L -o /usr/bin/docker 'https://s3-external-1.amazonaws.com/circle-downloads/docker-1.9.1-circleci-cp-workaround'
- sudo chmod 0755 /usr/bin/docker
services:
- docker
dependencies:
override:
- docker build -f distribution/nodejs/Dockerfile -t gaiaadm/result-processing .
- docker build -f distribution/python/Dockerfile -t gaiaadm/result-processing:latest-python .
- docker tag gaiaadm/result-processing gaiaadm/result-processing:$CIRCLE_BUILD_NUM-$CIRCLE_BRANCH
- docker tag gaiaadm/result-processing gaiaadm/result-processing:$CIRCLE_BRANCH
- docker tag gaiaadm/result-processing:latest-python gaiaadm/result-processing:$CIRCLE_BUILD_NUM-$CIRCLE_BRANCH-python
- docker tag gaiaadm/result-processing:latest-python gaiaadm/result-processing:$CIRCLE_BRANCH-python
test:
override:
- docker run -d --name rabbitmq -e "RABBITMQ_PASS=admin" gaiaadm/rabbitmq; sleep 10
# run jshint
- docker run --name jshint-runner gaiaadm/result-processing grunt jshint
# run unit tests on pure Node.js image
- docker run --name unit-test-runner gaiaadm/result-processing grunt unit
- docker cp unit-test-runner:/src/unit-test-results.xml $CIRCLE_ARTIFACTS/nodejs-unit-test-results.xml
- docker cp unit-test-runner:/src/unit-test-results.txt $CIRCLE_ARTIFACTS/nodejs-unit-test-results.txt
# run system tests on pure Node.js image
- docker run -e AMQ_USER="admin" -e AMQ_PASSWORD="admin" -e AMQ_SERVER="rabbitmq:5672" --link rabbitmq:rabbitmq --name system-test-runner gaiaadm/result-processing grunt system
- docker cp system-test-runner:/src/system-test-results.xml $CIRCLE_ARTIFACTS/nodejs-system-test-results.xml
- docker cp system-test-runner:/src/system-test-results.txt $CIRCLE_ARTIFACTS/nodejs-system-test-results.txt
# run unit tests on Python image
- docker run --name unit-test-runner-python gaiaadm/result-processing:latest-python grunt unit
- docker cp unit-test-runner-python:/src/unit-test-results.xml $CIRCLE_ARTIFACTS/python-unit-test-results.xml
- docker cp unit-test-runner-python:/src/unit-test-results.txt $CIRCLE_ARTIFACTS/python-unit-test-results.txt
# run system tests on Python image
- docker run -e AMQ_USER="admin" -e AMQ_PASSWORD="admin" -e AMQ_SERVER="rabbitmq:5672" --link rabbitmq:rabbitmq --name system-test-runner-python gaiaadm/result-processing:latest-python grunt system
- docker cp system-test-runner-python:/src/system-test-results.xml $CIRCLE_ARTIFACTS/python-system-test-results.xml
- docker cp system-test-runner-python:/src/system-test-results.txt $CIRCLE_ARTIFACTS/python-system-test-results.txt
deployment:
continuous:
branch: master
commands:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker push gaiaadm/result-processing
- docker push gaiaadm/result-processing:latest-python
general:
branches:
only:
- master
notify:
webhooks:
- url: https://webhook.master.gaiahub.io/wh/5a866f9b-98c9-438d-a8d4-53cf4ae9599c/4c310c8e220ee9bead74eece42ce0e109fd3535e