Skip to content

Commit 7df6275

Browse files
committed
fix: updated tekton pipeline and currency generation
Signed-off-by: Cagri Yonca <[email protected]>
1 parent 7794f4e commit 7df6275

File tree

3 files changed

+17
-13
lines changed

3 files changed

+17
-13
lines changed

.tekton/.currency/currency-tasks.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ spec:
3333
mountPath: /workspace
3434
steps:
3535
- name: generate-currency-report
36-
# public.ecr.aws/docker/library/python:3.10.15-bookworm
37-
image: public.ecr.aws/docker/library/python@sha256:2eb72484c25c39aba019b0ab5679c2436833a0b705e955ed8e13c06ee900dd63
36+
# public.ecr.aws/docker/library/python:3.12.9-bookworm
37+
image: public.ecr.aws/docker/library/python@sha256:ae24158f83adcb3ec1dead14356e6debc9f3125167624408d95338faacc5cce3
3838
script: |
3939
#!/usr/bin/env bash
4040
cd /workspace/python-sensor/.tekton/.currency

.tekton/.currency/scripts/generate_report.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# Standard Libraries
2-
import re
32
import json
3+
import re
4+
5+
import pandas as pd
46

57
# Third Party
68
import requests
7-
import pandas as pd
89
from bs4 import BeautifulSoup
910
from kubernetes import client, config
11+
from packaging.version import Version
1012

1113
JSON_FILE = "resources/table.json"
1214
REPORT_FILE = "docs/report.md"
@@ -67,7 +69,7 @@ def get_last_supported_version(tekton_ci_output, dependency):
6769

6870
def isUptodate(last_supported_version, latest_version):
6971
"""Check if the supported package is up-to-date"""
70-
if last_supported_version == latest_version:
72+
if Version(last_supported_version) >= Version(latest_version):
7173
up_to_date = "Yes"
7274
else:
7375
up_to_date = "No"
@@ -117,7 +119,9 @@ def process_taskrun_logs(
117119
match = re.search("Successfully installed .* (starlette-[^\s]+)", logs)
118120
tekton_ci_output += f"{match[1]}\n"
119121
elif task_name == "python-tracer-unittest-googlecloud-task":
120-
match = re.search("Successfully installed .* (google-cloud-storage-[^\s]+)", logs)
122+
match = re.search(
123+
"Successfully installed .* (google-cloud-storage-[^\s]+)", logs
124+
)
121125
tekton_ci_output += f"{match[1]}\n"
122126
elif task_name == "python-tracer-unittest-default-task":
123127
for line in logs.splitlines():

.tekton/task.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -136,19 +136,19 @@ spec:
136136
image: public.ecr.aws/bitnami/kafka@sha256:d2890d68f96b36da3c8413fa94294f018b2f95d87cf108cbf71eab510572d9be
137137
env:
138138
- name: KAFKA_CFG_NODE_ID
139-
value: 0
139+
value: "0"
140140
- name: KAFKA_CFG_PROCESS_ROLES
141-
value: controller,broker
141+
value: "controller,broker"
142142
- name: KAFKA_CFG_LISTENERS
143-
value: PLAINTEXT://:9092,CONTROLLER://:9093,EXTERNAL://:9094
143+
value: "PLAINTEXT://:9092,CONTROLLER://:9093,EXTERNAL://:9094"
144144
- name: KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP
145-
value: CONTROLLER:PLAINTEXT,EXTERNAL:PLAINTEXT,PLAINTEXT:PLAINTEXT
145+
value: "CONTROLLER:PLAINTEXT,EXTERNAL:PLAINTEXT,PLAINTEXT:PLAINTEXT"
146146
- name: KAFKA_CFG_CONTROLLER_QUORUM_VOTERS
147-
value: 0@kafka:9093
147+
value: "0@kafka:9093"
148148
- name: KAFKA_CFG_CONTROLLER_LISTENER_NAMES
149-
value: CONTROLLER
149+
value: "CONTROLLER"
150150
- name: KAFKA_CFG_ADVERTISED_LISTENERS
151-
value: PLAINTEXT://kafka:9092,EXTERNAL://localhost:9094
151+
value: "PLAINTEXT://kafka:9092,EXTERNAL://localhost:9094"
152152

153153
params:
154154
- name: imageDigest

0 commit comments

Comments
 (0)