Skip to content

Commit

Permalink
fix: updated tekton pipeline and currency generation
Browse files Browse the repository at this point in the history
Signed-off-by: Cagri Yonca <[email protected]>
  • Loading branch information
CagriYonca committed Feb 26, 2025
1 parent 7794f4e commit 7df6275
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .tekton/.currency/currency-tasks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ spec:
mountPath: /workspace
steps:
- name: generate-currency-report
# public.ecr.aws/docker/library/python:3.10.15-bookworm
image: public.ecr.aws/docker/library/python@sha256:2eb72484c25c39aba019b0ab5679c2436833a0b705e955ed8e13c06ee900dd63
# public.ecr.aws/docker/library/python:3.12.9-bookworm
image: public.ecr.aws/docker/library/python@sha256:ae24158f83adcb3ec1dead14356e6debc9f3125167624408d95338faacc5cce3
script: |
#!/usr/bin/env bash
cd /workspace/python-sensor/.tekton/.currency
Expand Down
12 changes: 8 additions & 4 deletions .tekton/.currency/scripts/generate_report.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# Standard Libraries
import re
import json
import re

import pandas as pd

# Third Party
import requests
import pandas as pd
from bs4 import BeautifulSoup
from kubernetes import client, config
from packaging.version import Version

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

def isUptodate(last_supported_version, latest_version):
"""Check if the supported package is up-to-date"""
if last_supported_version == latest_version:
if Version(last_supported_version) >= Version(latest_version):
up_to_date = "Yes"
else:
up_to_date = "No"
Expand Down Expand Up @@ -117,7 +119,9 @@ def process_taskrun_logs(
match = re.search("Successfully installed .* (starlette-[^\s]+)", logs)
tekton_ci_output += f"{match[1]}\n"
elif task_name == "python-tracer-unittest-googlecloud-task":
match = re.search("Successfully installed .* (google-cloud-storage-[^\s]+)", logs)
match = re.search(
"Successfully installed .* (google-cloud-storage-[^\s]+)", logs
)
tekton_ci_output += f"{match[1]}\n"
elif task_name == "python-tracer-unittest-default-task":
for line in logs.splitlines():
Expand Down
14 changes: 7 additions & 7 deletions .tekton/task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,19 +136,19 @@ spec:
image: public.ecr.aws/bitnami/kafka@sha256:d2890d68f96b36da3c8413fa94294f018b2f95d87cf108cbf71eab510572d9be
env:
- name: KAFKA_CFG_NODE_ID
value: 0
value: "0"
- name: KAFKA_CFG_PROCESS_ROLES
value: controller,broker
value: "controller,broker"
- name: KAFKA_CFG_LISTENERS
value: PLAINTEXT://:9092,CONTROLLER://:9093,EXTERNAL://:9094
value: "PLAINTEXT://:9092,CONTROLLER://:9093,EXTERNAL://:9094"
- name: KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP
value: CONTROLLER:PLAINTEXT,EXTERNAL:PLAINTEXT,PLAINTEXT:PLAINTEXT
value: "CONTROLLER:PLAINTEXT,EXTERNAL:PLAINTEXT,PLAINTEXT:PLAINTEXT"
- name: KAFKA_CFG_CONTROLLER_QUORUM_VOTERS
value: 0@kafka:9093
value: "0@kafka:9093"
- name: KAFKA_CFG_CONTROLLER_LISTENER_NAMES
value: CONTROLLER
value: "CONTROLLER"
- name: KAFKA_CFG_ADVERTISED_LISTENERS
value: PLAINTEXT://kafka:9092,EXTERNAL://localhost:9094
value: "PLAINTEXT://kafka:9092,EXTERNAL://localhost:9094"

params:
- name: imageDigest
Expand Down

0 comments on commit 7df6275

Please sign in to comment.