From ac2db0ec1c54f3fa15d8b58c83da39cb0fe459c4 Mon Sep 17 00:00:00 2001 From: Mykola Serdiuk Date: Fri, 29 Sep 2023 10:06:34 +0300 Subject: [PATCH] chore: Automate image bump in Chart.yaml for release process (#42) Jira EPMDEDP-12654 Related https://github.com/epam/edp-tekton/issues/42 Change-Id: I53edd31df2716315d9d255fd5713b86b7a9ec159 --- .../release/release-edp-install-component-operator.yaml | 2 ++ .../release/release-operators-headlamp-tekton.yaml | 2 ++ .../templates/tasks/release/UpdateReleaseVersion.yaml | 6 ++++++ 3 files changed, 10 insertions(+) diff --git a/charts/custom-pipelines/templates/pipelines/release/release-edp-install-component-operator.yaml b/charts/custom-pipelines/templates/pipelines/release/release-edp-install-component-operator.yaml index 4990b911..84ec7a68 100644 --- a/charts/custom-pipelines/templates/pipelines/release/release-edp-install-component-operator.yaml +++ b/charts/custom-pipelines/templates/pipelines/release/release-edp-install-component-operator.yaml @@ -109,6 +109,8 @@ spec: value: $(params.version) - name: chart-path value: $(params.chart-path) + - name: codebase-name + value: $(params.codebase-name) workspaces: - name: source workspace: shared-workspace diff --git a/charts/custom-pipelines/templates/pipelines/release/release-operators-headlamp-tekton.yaml b/charts/custom-pipelines/templates/pipelines/release/release-operators-headlamp-tekton.yaml index eb697dbc..11a8ddb9 100644 --- a/charts/custom-pipelines/templates/pipelines/release/release-operators-headlamp-tekton.yaml +++ b/charts/custom-pipelines/templates/pipelines/release/release-operators-headlamp-tekton.yaml @@ -112,6 +112,8 @@ spec: value: $(params.version) - name: chart-path value: $(params.chart-path) + - name: codebase-name + value: $(params.codebase-name) workspaces: - name: source workspace: shared-workspace diff --git a/charts/custom-pipelines/templates/tasks/release/UpdateReleaseVersion.yaml b/charts/custom-pipelines/templates/tasks/release/UpdateReleaseVersion.yaml index 9ff3a320..bc0e5b57 100644 --- a/charts/custom-pipelines/templates/tasks/release/UpdateReleaseVersion.yaml +++ b/charts/custom-pipelines/templates/tasks/release/UpdateReleaseVersion.yaml @@ -25,6 +25,9 @@ spec: description: "Path to chart directory" default: "deploy-templates" type: string + - name: codebase-name + description: "Application name" + type: string steps: - name: update-helm-version image: $(params.base_image) @@ -34,6 +37,8 @@ spec: value: "$(params.version)" - name: CHART_PATH value: "$(params.chart-path)" + - name: CODEBASE_NAME + value: "$(params.codebase-name)" script: | #!/usr/bin/env sh set -e @@ -46,6 +51,7 @@ spec: echo "[TEKTON][DEBUG] Update Version and AppVersion in Chart.yaml" sed -i "s/^version:.*\$/version: ${VERSION}/" "${chartPath}" sed -i "s/^appVersion:.*\$/appVersion: ${VERSION}/" "${chartPath}" + sed -i "s/${CODEBASE_NAME}:.*\$/${CODEBASE_NAME}:${VERSION}/" "${chartPath}" # Update version in README.md echo "[TEKTON][DEBUG] Generate Readme.md"