forked from elodina/siesta
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
37 lines (35 loc) · 1.46 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
language: go
go:
- 1.4
- 1.5
- 1.6
- tip
before_install:
- export TRAVIS_CI=true
- export KAFKA_VERSION=0.8.2.2
- 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=0
- export HOST_IP=localhost
- export PORT=9092
- export ZK_VERSION=3.4.6
- export ZK_RELEASE=zookeeper-$ZK_VERSION
- export ZK_URL=http://apache.ip-connect.vn.ua/zookeeper/zookeeper-$ZK_VERSION/$ZK_RELEASE.tar.gz
- export ZK_HOME=/tmp/$ZK_RELEASE
- 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
- $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 &
after_script:
- $KAFKA_PATH/bin/kafka-server-stop.sh
- $ZK_HOME/bin/zkServer.sh stop