From 49db5bce1ee12340c4c30f7b4ae498707c9f5717 Mon Sep 17 00:00:00 2001 From: Mostafa Shorim Date: Wed, 6 Dec 2023 13:52:51 +0100 Subject: [PATCH] Tag telemetry-manager image with module version and remove release job (#9456) * tag telemetry-manager image with module version and remove release job * tag telemetry-manager image with module version in a separate job * change job name * add auto-generated empty line --- .../telemetry-manager-generic.yaml | 39 +++++++++++++------ templates/data/telemetry-manager-data.yaml | 27 ++++++------- 2 files changed, 39 insertions(+), 27 deletions(-) diff --git a/prow/jobs/kyma-project/telemetry-manager/telemetry-manager-generic.yaml b/prow/jobs/kyma-project/telemetry-manager/telemetry-manager-generic.yaml index 6169e6f00ebc..701c8e50ad8d 100644 --- a/prow/jobs/kyma-project/telemetry-manager/telemetry-manager-generic.yaml +++ b/prow/jobs/kyma-project/telemetry-manager/telemetry-manager-generic.yaml @@ -107,16 +107,16 @@ postsubmits: # runs on main - name: signify-secret secret: secretName: signify-dev-secret - - name: post-telemetry-manager-release-module + - name: post-telemetry-manager-build-release annotations: - description: "Post-submit job to release telemetry module." + description: "Post-submit job to build telemetry-manager image for a release." owner: "huskies" labels: prow.k8s.io/pubsub.project: "sap-kyma-prow" - prow.k8s.io/pubsub.runID: "post-telemetry-manager-release-module" + prow.k8s.io/pubsub.runID: "post-telemetry-manager-build-release" prow.k8s.io/pubsub.topic: "prowjobs" - preset-bot-github-token: "true" preset-sa-kyma-push-images: "true" + preset-signify-prod-secret: "true" always_run: true skip_report: false decorate: true @@ -129,21 +129,36 @@ postsubmits: # runs on main channel: huskies-notifications spec: containers: - - image: "europe-docker.pkg.dev/kyma-project/prod/testimages/e2e-gcloud:v20231204-57f98c4e" + - image: "eu.gcr.io/sap-kyma-neighbors-dev/image-builder:v20230313-8dfce5f0b" securityContext: privileged: false seccompProfile: type: RuntimeDefault allowPrivilegeEscalation: false command: - - "make" + - "/image-builder" args: - - "release" - env: - - name: RELEASE_TAG - value: "${PULL_BASE_REF}" + - "--name=telemetry-manager" + - "--config=/config/kaniko-build-config.yaml" + - "--context=." + - "--dockerfile=Dockerfile" + - "--tag=$(PULL_BASE_REF)" resources: requests: - memory: 3Gi - cpu: 2 + memory: 1.5Gi + cpu: 1 + volumeMounts: + - name: config + mountPath: /config + readOnly: true + - name: signify-secret + mountPath: /secret + readOnly: true + volumes: + - name: config + configMap: + name: kaniko-build-config + - name: signify-secret + secret: + secretName: signify-dev-secret \ No newline at end of file diff --git a/templates/data/telemetry-manager-data.yaml b/templates/data/telemetry-manager-data.yaml index 5aa9735568a2..2951fce201b7 100644 --- a/templates/data/telemetry-manager-data.yaml +++ b/templates/data/telemetry-manager-data.yaml @@ -53,26 +53,23 @@ templates: - kaniko_buildpack - jobConfig_postsubmit - jobConfig: - name: post-telemetry-manager-release-module + name: post-telemetry-manager-build-release annotations: owner: huskies - description: Post-submit job to release telemetry module. + description: Post-submit job to build telemetry-manager image for a release. slack_channel: huskies-notifications - always_run: "true" - labels: - preset-sa-kyma-push-images: "true" - preset-bot-github-token: "true" - env: - RELEASE_TAG: "${PULL_BASE_REF}" - command: "make" - args: - - "release" branches: - "^\\d+\\.\\d+\\.\\d+$" # Regex for release tag - image: "europe-docker.pkg.dev/kyma-project/prod/testimages/e2e-gcloud:v20231204-57f98c4e" + always_run: true + labels: + preset-signify-prod-secret: "true" + args: + - "--name=telemetry-manager" + - "--config=/config/kaniko-build-config.yaml" + - "--context=." + - "--dockerfile=Dockerfile" + - "--tag=$(PULL_BASE_REF)" inheritedConfigs: global: - - jobConfig_default + - kaniko_buildpack - jobConfig_postsubmit - local: - - job_default