forked from caicloud/cyclone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcaicloud_e2e-test.yml
65 lines (65 loc) · 2.09 KB
/
caicloud_e2e-test.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
integration:
services:
mongo:
image: cargo.caicloud.io/caicloud/mongo:3.0.5
ports:
- "27017:27017"
command: mongod --smallfiles
zookeeper:
image: cargo.caicloud.io/caicloud/zookeeper:3.4.6
ports:
- "2181:2181"
kafka:
image: cargo.caicloud.io/caicloud/kafka:0.10.1.0
environment:
- KAFKA_ADVERTISED_HOST_NAME=172.18.0.4
- KAFKA_ADVERTISED_PORT=9092
- KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
links:
- zookeeper:zk
ports:
- "9092:9092"
image: cargo.caicloud.io/caicloud/golang-docker:1.8-17.03
volumes:
# auto mount code to container /root/code dir
- /var/run/docker.sock:/var/run/docker.sock
environment:
- GOPATH=/go
- DEBUG=true
- REGISTRY_LOCATION=cargo.caicloud.io
- REGISTRY_USERNAME=caicloudadmin
- REGISTRY_PASSWORD=caicloudadmin
- KAFKA_HOST=kafka:9092
- MONGODB_HOST=mongo:27017
- CYCLONE_SERVER=http://172.18.0.1:7099
- LOG_SERVER=ws://172.18.0.1:8000/ws
- ERRORTEMPLATE=/go/src/github.com/caicloud/cyclone/notify/provider/error.html
- SUCCESSTEMPLATE=/go/src/github.com/caicloud/cyclone/notify/provider/success.html
- WORKER_IMAGE=cargo.caicloud.io/caicloud/cyclone-worker:latest
- WORKDIR=/go/src/github.com/caicloud/cyclone
# in e2e docker version 1.11.2 api version 1.23
- DOCKER_HOST=unix:///var/run/docker.sock
- DOCKER_API_VERSION=1.23
links:
- mongo
- kafka
ports:
- "7099:7099"
- "8000:8000"
commands: # just like shell script
- set -e
- mkdir -p $WORKDIR
- cp ./ -rf $WORKDIR
- cd $WORKDIR
# build server
- echo "==> building server ..."
- go build -o cyclone-server github.com/caicloud/cyclone/cmd/server
# build woker image
- echo "==> building worker ..."
- go build -o cyclone-worker github.com/caicloud/cyclone/cmd/worker
- docker -H ${DOCKER_HOST} build -t ${WORKER_IMAGE} -f Dockerfile.worker .
- echo "==> start server"
- ./cyclone-server &
- go test -v ./tests/service
- go test -v ./tests/version
- go test -v ./tests/yaml