forked from wurstmeister/kafka-docker
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
87 lines (78 loc) · 2.33 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
sudo: required
language: scala
services:
- docker
# This version will be also tagged as 'latest'
env:
global:
- LATEST="2.13-2.6.0"
# Build recommended versions based on: http://kafka.apache.org/downloads
matrix:
include:
- scala: "2.10"
env: KAFKA_VERSION=0.8.2.2
- scala: 2.11
env: KAFKA_VERSION=0.9.0.1
- scala: 2.11
env: KAFKA_VERSION=0.10.2.2
- scala: 2.11
env: KAFKA_VERSION=0.11.0.3
- scala: 2.11
env: KAFKA_VERSION=1.0.2
- scala: 2.11
env: KAFKA_VERSION=1.1.1
- scala: 2.12
env: KAFKA_VERSION=2.0.1
- scala: 2.12
env: KAFKA_VERSION=2.1.1
- scala: 2.12
env: KAFKA_VERSION=2.2.2
- scala: 2.12
env: KAFKA_VERSION=2.3.1
- scala: 2.12
env: KAFKA_VERSION=2.4.1
- scala: 2.12
env: KAFKA_VERSION=2.5.0
- scala: 2.13
env: KAFKA_VERSION=2.6.0
install:
- docker --version
- docker-compose --version
- echo "KAFKA VERSION $KAFKA_VERSION"
- echo "SCALA VERSION $TRAVIS_SCALA_VERSION"
- echo "LATEST VERSION $LATEST"
- export CURRENT=${TRAVIS_SCALA_VERSION}-${KAFKA_VERSION}
- docker build --build-arg kafka_version=$KAFKA_VERSION --build-arg scala_version=$TRAVIS_SCALA_VERSION --build-arg vcs_ref=$TRAVIS_COMMIT --build-arg build_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") -t wurstmeister/kafka .
- docker pull confluentinc/cp-kafkacat
before_script:
- docker-compose -f test/docker-compose.yml up -d zookeeper kafka_1 kafka_2
script:
# Shellcheck main source files
- shellcheck -s bash broker-list.sh create-topics.sh start-kafka.sh download-kafka.sh versions.sh
- cd test
# Shellcheck the tests
- shellcheck -x -e SC1090 -s bash *.sh **/*.sh
- ./verifyImageLabels.sh # Verify docker image's label
- sleep 5 # Wait for containers to start
- docker-compose logs
- docker ps -a
- ./runAllTests.sh
# End-to-End scenario tests
- cd scenarios
- ./runJmxScenario.sh
- cd $TRAVIS_BUILD_DIR
after_script:
- docker-compose stop
# This will deploy from master. Might want to have a single release branch for a little more control
deploy:
- provider: script
script: bash docker_push latest
on:
repo: wurstmeister/kafka-docker
branch: master
condition: $CURRENT = $LATEST
- provider: script
script: bash docker_push "${TRAVIS_SCALA_VERSION}-${KAFKA_VERSION}"
on:
repo: wurstmeister/kafka-docker
# branch: release