forked from elodina/go-kafka-avro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
45 lines (43 loc) · 1.91 KB
/
.travis.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
language: go
go:
- 1.3
- 1.4
- 1.5
- 1.6
- tip
before_install:
- export KAFKA_VERSION=0.8.2.1
- export SCALA_VERSION=2.10
- export KAFKA_RELEASE=kafka_$SCALA_VERSION-$KAFKA_VERSION
- export KAFKA_URL=https://archive.apache.org/dist/kafka/$KAFKA_VERSION/$KAFKA_RELEASE.tgz
- export KAFKA_PATH=/tmp/$KAFKA_RELEASE
- export BROKER_ID=1
- export HOST_IP=localhost
- export PORT=9092
- export ZK_VERSION=3.4.6
- export ZK_RELEASE=zookeeper-$ZK_VERSION
- export ZK_URL=https://archive.apache.org/dist/zookeeper/zookeeper-$ZK_VERSION/$ZK_RELEASE.tar.gz
- export ZK_HOME=/tmp/$ZK_RELEASE
- export REGISTRY_VERSION=1.0
- export SCALA_VERSION=2.10.4
- export REGISTRY_URL=http://packages.confluent.io/archive/$REGISTRY_VERSION/confluent-$REGISTRY_VERSION-$SCALA_VERSION.tar.gz
- export REGISTRY_HOME=/tmp/confluent-$REGISTRY_VERSION
- export GOMAXPROCS=1
- wget -q $KAFKA_URL -O /tmp/$KAFKA_RELEASE.tgz
- tar xfz /tmp/$KAFKA_RELEASE.tgz -C /tmp
- wget -q $ZK_URL -O /tmp/$ZK_RELEASE.tar.gz
- tar -xzf /tmp/$ZK_RELEASE.tar.gz -C /tmp
- cp $ZK_HOME/conf/zoo_sample.cfg $ZK_HOME/conf/zoo.cfg
- wget -q $REGISTRY_URL -O /tmp/confluent-$REGISTRY_VERSION-$SCALA_VERSION.tgz
- tar xfz /tmp/confluent-$REGISTRY_VERSION-$SCALA_VERSION.tgz -C /tmp
- $ZK_HOME/bin/zkServer.sh start
- sed -r -i "s/(zookeeper.connect)=(.*)/\\1=$ZK_PORT_2181_TCP_ADDR/g" $KAFKA_PATH/config/server.properties
- sed -r -i "s/(broker.id)=(.*)/\\1=$BROKER_ID/g" $KAFKA_PATH/config/server.properties
- sed -r -i "s/#(advertised.host.name)=(.*)/\\1=$HOST_IP/g" $KAFKA_PATH/config/server.properties
- sed -r -i "s/^(port)=(.*)/\\1=$PORT/g" $KAFKA_PATH/config/server.properties
- sed -r -i "s/^(log4j.rootLogger)=(.*)( stdout)/\\1=WARN\\3/g" $KAFKA_PATH/config/log4j.properties
- $KAFKA_PATH/bin/kafka-server-start.sh $KAFKA_PATH/config/server.properties &
- $REGISTRY_HOME/bin/schema-registry-start $REGISTRY_HOME/etc/schema-registry/schema-registry.properties &
- sleep 15
script:
- go test -v -race