From f303b6e054f866cfd53dde02fb3784b733907729 Mon Sep 17 00:00:00 2001 From: Vladislav Sukhin Date: Fri, 11 Oct 2024 13:57:33 +0300 Subject: [PATCH] feat: [TKC-2684] docker image version (#5918) * feat: docker image version Signed-off-by: Vladislav Sukhin * fix: format json Signed-off-by: Vladislav Sukhin * fix: pass docker_image_version arg Signed-off-by: Vladislav Sukhin --------- Signed-off-by: Vladislav Sukhin --- .github/workflows/release-dev.yaml | 1 + .github/workflows/release.yaml | 1 + api/v1/testkube.yaml | 4 ++ build/kind/entrypoint.sh | 62 ++++++++++++------------ build/kind/kind.Dockerfile | 2 + cmd/api-server/main.go | 1 + internal/app/api/v1/handlers.go | 1 + internal/app/api/v1/server.go | 3 ++ internal/config/config.go | 1 + pkg/api/v1/testkube/model_server_info.go | 2 + pkg/telemetry/payload.go | 25 ++++------ pkg/telemetry/sender_sio.go | 2 +- 12 files changed, 58 insertions(+), 47 deletions(-) diff --git a/.github/workflows/release-dev.yaml b/.github/workflows/release-dev.yaml index 828a0891571..7e61339e28d 100644 --- a/.github/workflows/release-dev.yaml +++ b/.github/workflows/release-dev.yaml @@ -162,6 +162,7 @@ jobs: segmentio_key=${{secrets.TESTKUBE_SEGMENTIO_KEY}} ga_id=${{secrets.TESTKUBE_CLI_GA_MEASUREMENT_ID}} ga_secret=${{secrets.TESTKUBE_CLI_GA_MEASUREMENT_SECRET}} + docker_image_version=${{steps.tag.outputs.tag}} context: build/kind file: build/kind/kind.Dockerfile platforms: linux/amd64,linux/arm64/v8 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index cb3516832f8..b59e50e038d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -152,6 +152,7 @@ jobs: segmentio_key=${{secrets.TESTKUBE_SEGMENTIO_KEY}} ga_id=${{secrets.TESTKUBE_CLI_GA_MEASUREMENT_ID}} ga_secret=${{secrets.TESTKUBE_CLI_GA_MEASUREMENT_SECRET}} + docker_image_version=${{steps.tag.outputs.tag}} context: build/kind file: build/kind/kind.Dockerfile platforms: linux/amd64,linux/arm64 diff --git a/api/v1/testkube.yaml b/api/v1/testkube.yaml index 88291fa5f42..6b9a3a63777 100644 --- a/api/v1/testkube.yaml +++ b/api/v1/testkube.yaml @@ -6217,6 +6217,10 @@ components: items: type: string example: my-namespace + dockerImageVersion: + type: string + description: docker image version + example: "2.1.2" Repository: description: repository representation for tests in git repositories diff --git a/build/kind/entrypoint.sh b/build/kind/entrypoint.sh index de2ee74779b..c1b6f3b2b85 100644 --- a/build/kind/entrypoint.sh +++ b/build/kind/entrypoint.sh @@ -69,21 +69,21 @@ send_event_to_segment() { # Prepare the JSON payload local payload=$(cat <