-
Notifications
You must be signed in to change notification settings - Fork 7
/
circle.yml
26 lines (23 loc) · 1.02 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
machine:
services:
- docker
dependencies:
override:
- RELEASE=$(grep "MARIADB_VERSION=" Dockerfile | sed 's|^.*=||g' |awk '{print $1}'); docker build -t million12/mariadb:$RELEASE .
- docker build -t million12/mariadb:latest .
test:
override:
- docker run -d -p 13306:3306 -e MARIADB_PASS="mypass" --name db million12/mariadb:$RELEASE
- docker logs -f db > ${CIRCLE_ARTIFACTS}/docker-db.log:
background: true
# Wait till DB is fully bootstrapped
- while true; do if grep "ready for connections" ${CIRCLE_ARTIFACTS}/docker-db.log; then break; else sleep 1; fi done
- mysqladmin -uadmin -pmypass -h127.0.0.1 -P13306 ping
- mysql -uadmin -pmypass -h127.0.0.1 -P13306 -e "show databases"
deployment:
production:
branch: master
commands:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- RELEASE=$(grep "MARIADB_VERSION=" Dockerfile | sed 's|^.*=||g' |awk '{print $1}'); docker push million12/mariadb:$RELEASE
- docker push million12/mariadb:latest