Skip to content

Commit 5bce4cc

Browse files
committed
Configured Kafka in CI/CD pipeline
1 parent ebd0544 commit 5bce4cc

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.github/workflows/java-ci.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
services:
14+
1415
mongo:
1516
image: mongo:6.0
1617
ports:
@@ -21,6 +22,23 @@ jobs:
2122
--health-timeout 5s
2223
--health-retries 5
2324
25+
zookeeper:
26+
image: wurstmeister/zookeeper
27+
ports:
28+
- 2181:2181
29+
30+
kafka:
31+
image: wurstmeister/kafka
32+
ports:
33+
- 9092:9092
34+
env:
35+
KAFKA_ADVERTISED_HOST_NAME: localhost
36+
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
37+
KAFKA_LISTENERS: PLAINTEXT://:9092
38+
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092
39+
options: >-
40+
--health-cmd "echo 'hello'" --health-interval 10s --health-timeout 5s --health-retries 3
41+
2442
env:
2543
MONGO_URI: ${{ secrets.MONGO_URI }}
2644
MAIL_USERNAME: ${{ secrets.USERNAME }}

0 commit comments

Comments
 (0)