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
33 lines (33 loc) · 1.54 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
machine:
# pre section is a workaround for https://discuss.circleci.com/t/unable-to-use-docker-cp-but-it-worked-2-days-ago/1137/9
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.0-circleci-cp-workaround'
- sudo chmod 0755 /usr/bin/docker
services:
- docker
dependencies:
override:
- cp Dockerfile Dockerfile.run
- cp Dockerfile.build Dockerfile
- docker build -t build-img .
- docker create --name build-cont build-img
- mkdir -p ./target
- docker cp build-cont:/usr/local/gaia/target/data-faker-1.0-SNAPSHOT.jar ./target/data-faker-1.0-SNAPSHOT.jar
- cp Dockerfile.run Dockerfile
- docker build -t gaiaadm/data-faker .
- docker tag gaiaadm/data-faker gaiaadm/data-faker:$CIRCLE_BUILD_NUM
test:
override:
- docker run -d -p 5673:5672 -p 15673:15672 -e RABBITMQ_PASS="mypass" --name rabbitmq tutum/rabbitmq
- docker run -d -p 8080:8080 -p 8081:8081 --link rabbitmq:rabbitmq --name faker gaiaadm/data-faker:$CIRCLE_BUILD_NUM java -Ddw.rabbitmq.username=admin -Ddw.rabbitmq.password=mypass -jar /data/target/data-faker-1.0-SNAPSHOT.jar server; sleep 5
- "curl -X POST 'http://localhost:8080/fake-data?repeat=2&sendto=rabbitmq'"
deployment:
hub:
branch: master
commands:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker push gaiaadm/data-faker
general:
artifacts:
- target/data-faker-1.0-SNAPSHOT.jar