Skip to content

Commit 467c52c

Browse files
committed
ci: Improve Kafka CI pipeline.
Since we have constrains to install `kafka-python` depending on the Python runtime, this commit improves the CI pipeline to test in Python versions >= 3.11. Signed-off-by: Paulo Vital <paulo.vital@ibm.com>
1 parent 7e58965 commit 467c52c

3 files changed

Lines changed: 17 additions & 11 deletions

File tree

.circleci/config.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,12 @@ jobs:
241241
- store-pytest-results
242242
- store-coverage-report
243243

244-
py312kafka:
244+
pykafka:
245+
parameters:
246+
py-version:
247+
type: string
245248
docker:
246-
- image: public.ecr.aws/docker/library/python:3.12
249+
- image: public.ecr.aws/docker/library/python:<<parameters.py-version>>
247250
- image: public.ecr.aws/bitnami/kafka:3.9.0
248251
environment:
249252
KAFKA_CFG_NODE_ID: 0
@@ -309,7 +312,10 @@ workflows:
309312
- py39cassandra
310313
- py39gevent_starlette
311314
- py312aws
312-
- py312kafka
315+
- pykafka:
316+
matrix:
317+
parameters:
318+
py-version: ["3.11", "3.12", "3.13"]
313319
- autowrapt:
314320
matrix:
315321
parameters:
@@ -322,5 +328,5 @@ workflows:
322328
- py39cassandra
323329
- py39gevent_starlette
324330
- py312aws
325-
- py312kafka
331+
- pykafka
326332
- autowrapt

.tekton/pipeline.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,11 @@ spec:
9292
- clone
9393
matrix:
9494
params:
95-
- name: imageDigest
95+
- name: pythonVersion
9696
value:
97-
# public.ecr.aws/docker/library/python:3.12.10-bookworm
98-
- "sha256:4ea730e54e2a87b716ffc58a426bd627baa182a3d4d5696d05c1bca2dde775aa"
97+
- "3.11"
98+
- "3.12"
99+
- "3.13"
99100
taskRef:
100101
name: python-tracer-unittest-kafka-task
101102
workspaces:

.tekton/task.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,7 @@ metadata:
175175
spec:
176176
sidecars:
177177
- name: kafka
178-
# public.ecr.aws/bitnami/kafka:3.9.0
179-
image: public.ecr.aws/bitnami/kafka@sha256:d2890d68f96b36da3c8413fa94294f018b2f95d87cf108cbf71eab510572d9be
178+
image: public.ecr.aws/bitnami/kafka:3.9
180179
env:
181180
- name: KAFKA_CFG_NODE_ID
182181
value: "0"
@@ -193,14 +192,14 @@ spec:
193192
- name: KAFKA_CFG_ADVERTISED_LISTENERS
194193
value: "PLAINTEXT://kafka:9092,EXTERNAL://localhost:9094"
195194
params:
196-
- name: imageDigest
195+
- name: pythonVersion
197196
type: string
198197
workspaces:
199198
- name: task-pvc
200199
mountPath: /workspace
201200
steps:
202201
- name: unittest
203-
image: public.ecr.aws/docker/library/python@$(params.imageDigest)
202+
image: public.ecr.aws/docker/library/python@$(params.pythonVersion)
204203
env:
205204
- name: TEST_CONFIGURATION
206205
value: kafka

0 commit comments

Comments
 (0)