-
Notifications
You must be signed in to change notification settings - Fork 3
/
circle.yml
23 lines (23 loc) · 1.01 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
machine:
services:
- docker
dependencies:
pre:
- pip install -U ansible boto six
override:
- cp build/supervisor_${CIRCLE_BRANCH}.conf build/supervisor.conf || true
- "docker build -t zeus/${CIRCLE_PROJECT_REPONAME}:${CIRCLE_BRANCH} ."
- "docker run -d -e MYSQL_ROOT_PASSWORD=pass -e MYSQL_DATABASE=test_db --name db mysql:latest mysqld --character-set-server=utf8"
- sleep 10
test:
override:
- docker run -it --link db:db zeus/${CIRCLE_PROJECT_REPONAME}:${CIRCLE_BRANCH} /root/src/manage.py test pybbm_org --noinput
deployment:
master:
branch: master
commands:
- "docker login -e ${DOCKER_EMAIL} -u ${DOCKER_USER} -p ${DOCKER_PASS}"
- "docker push zeus/${CIRCLE_PROJECT_REPONAME}:${CIRCLE_BRANCH}"
- "git clone -b direct_ansible [email protected]:hovel/deploy-inventory.git ~/deploy-inventory"
- "cp ~/deploy-inventory/ansible_circle.cfg ~/.ansible.cfg"
- "ansible-playbook ~/deploy-inventory/ansible/playbooks_new/pybbm_org/i_pybbm_org.yml --tags=application"